Commit ef8aac65 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Replace deprecated gtk_misc_set_align with new functions

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 00aa57dd
......@@ -494,8 +494,10 @@ girara_completion_row_create(const char* command, const char* description, bool
GtkLabel *show_command = GTK_LABEL(gtk_label_new(NULL));
GtkLabel *show_description = GTK_LABEL(gtk_label_new(NULL));
gtk_misc_set_alignment(GTK_MISC(show_command), 0.0, 0.0);
gtk_misc_set_alignment(GTK_MISC(show_description), 1.0, 0.0);
gtk_widget_set_halign(show_command, GTK_ALIGN_START);
gtk_widget_set_valign(show_command, GTK_ALIGN_START);
gtk_widget_set_halign(show_description, GTK_ALIGN_END);
gtk_widget_set_valign(show_description, GTK_ALIGN_START);
gtk_label_set_use_markup(show_command, TRUE);
gtk_label_set_use_markup(show_description, TRUE);
......
......@@ -398,7 +398,8 @@ girara_session_init(girara_session_t* session, const char* sessionname)
/* notification area */
gtk_container_add(GTK_CONTAINER(session->gtk.notification_area), session->gtk.notification_text);
gtk_misc_set_alignment(GTK_MISC(session->gtk.notification_text), 0.0, 0.5);
gtk_widget_set_halign(session->gtk.notification_text, GTK_ALIGN_START);
gtk_widget_set_valign(session->gtk.notification_text, GTK_ALIGN_CENTER);
gtk_label_set_use_markup(GTK_LABEL(session->gtk.notification_text), TRUE);
/* inputbar */
......
......@@ -21,8 +21,9 @@ girara_statusbar_item_add(girara_session_t* session, bool expand, bool fill, boo
widget_add_class(GTK_WIDGET(item->text), "statusbar");
/* set properties */
gtk_misc_set_alignment(GTK_MISC(item->text), left ? 0.0 : 1.0, 0.5);
gtk_label_set_use_markup(item->text, TRUE);
gtk_widget_set_halign(GTK_WIDGET(item->text), left ? GTK_ALIGN_START : GTK_ALIGN_END);
gtk_widget_set_valign(GTK_WIDGET(item->text), GTK_ALIGN_CENTER);
gtk_label_set_use_markup(item->text, TRUE);
/* add ellipsis if item is on the left side */
if (left == true) {
......
......@@ -68,7 +68,8 @@ girara_tab_new(girara_session_t* session, const char* title, GtkWidget* widget,
g_signal_connect(G_OBJECT(tab_event), "button_press_event",
G_CALLBACK(girara_callback_tab_clicked), tab);
gtk_misc_set_alignment(GTK_MISC(tab_label), 0.0f, 0.0f);
gtk_widget_set_halign(tab_label, GTK_ALIGN_START);
gtk_widget_set_valign(tab_label, GTK_ALIGN_START);
widget_add_class(tab_label, "tab");
widget_add_class(tab_event, "tab");
gtk_label_set_ellipsize(GTK_LABEL(tab_label), PANGO_ELLIPSIZE_MIDDLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment