replace dprecated gtk_widget_reparent(), and remove useless gtkut_container_remove()
This commit is contained in:
parent
fcd3988a11
commit
b537038c0c
5 changed files with 15 additions and 23 deletions
|
@ -403,11 +403,6 @@ void gtkut_clist_set_focus_row(GtkCMCList *clist, gint row)
|
|||
GTKUT_CTREE_REFRESH(clist);
|
||||
}
|
||||
|
||||
void gtkut_container_remove(GtkContainer *container, GtkWidget *widget)
|
||||
{
|
||||
gtk_container_remove(container, widget);
|
||||
}
|
||||
|
||||
static gboolean gtkut_text_buffer_match_string(GtkTextBuffer *textbuf,
|
||||
const GtkTextIter *iter,
|
||||
gunichar *wcs, gint len,
|
||||
|
|
|
@ -132,9 +132,6 @@ void gtkut_ctree_set_focus_row (GtkCMCTree *ctree,
|
|||
void gtkut_clist_set_focus_row (GtkCMCList *clist,
|
||||
gint row);
|
||||
|
||||
void gtkut_container_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
|
||||
gchar *gtkut_text_view_get_selection (GtkTextView *textview);
|
||||
void gtkut_text_view_set_position (GtkTextView *text, gint pos);
|
||||
gboolean gtkut_text_view_search_string (GtkTextView *text, const gchar *str,
|
||||
|
|
|
@ -2652,11 +2652,11 @@ static void main_window_separation_change(MainWindow *mainwin, LayoutType layout
|
|||
g_object_ref(folder_wid);
|
||||
g_object_ref(summary_wid);
|
||||
g_object_ref(message_wid);
|
||||
gtkut_container_remove
|
||||
gtk_container_remove
|
||||
(GTK_CONTAINER(gtk_widget_get_parent(folder_wid)), folder_wid);
|
||||
gtkut_container_remove
|
||||
gtk_container_remove
|
||||
(GTK_CONTAINER(gtk_widget_get_parent(summary_wid)), summary_wid);
|
||||
gtkut_container_remove
|
||||
gtk_container_remove
|
||||
(GTK_CONTAINER(gtk_widget_get_parent(message_wid)), message_wid);
|
||||
|
||||
gtk_widget_hide(mainwin->window);
|
||||
|
@ -2732,11 +2732,11 @@ void main_window_toggle_message_view(MainWindow *mainwin)
|
|||
mainwin->messageview->visible = FALSE;
|
||||
summaryview->displayed = NULL;
|
||||
g_object_ref(ppaned);
|
||||
gtkut_container_remove(GTK_CONTAINER(container), ppaned);
|
||||
gtk_widget_reparent(GTK_WIDGET_PTR(summaryview), container);
|
||||
gtk_container_remove(GTK_CONTAINER(container), ppaned);
|
||||
gtk_container_add(GTK_CONTAINER(container), GTK_WIDGET_PTR(summaryview));
|
||||
} else {
|
||||
mainwin->messageview->visible = TRUE;
|
||||
gtk_widget_reparent(GTK_WIDGET_PTR(summaryview), ppaned);
|
||||
gtk_container_remove(GTK_CONTAINER(container), ppaned);
|
||||
gtk_container_add(GTK_CONTAINER(container), ppaned);
|
||||
g_object_unref(ppaned);
|
||||
}
|
||||
|
@ -2747,7 +2747,7 @@ void main_window_toggle_message_view(MainWindow *mainwin)
|
|||
mainwin->messageview->visible = FALSE;
|
||||
summaryview->displayed = NULL;
|
||||
g_object_ref(mainwin->messageview->vbox);
|
||||
gtkut_container_remove(GTK_CONTAINER(container), mainwin->messageview->vbox);
|
||||
gtk_container_remove(GTK_CONTAINER(container), mainwin->messageview->vbox);
|
||||
} else {
|
||||
mainwin->messageview->visible = TRUE;
|
||||
gtk_container_add(GTK_CONTAINER(container), mainwin->messageview->vbox);
|
||||
|
|
|
@ -2716,8 +2716,8 @@ static void icon_list_clear (MimeView *mimeview)
|
|||
|
||||
orig = gtk_container_get_children(GTK_CONTAINER(mimeview->icon_grid));
|
||||
for (child = orig; child != NULL; child = g_list_next(child)) {
|
||||
gtkut_container_remove(GTK_CONTAINER(mimeview->icon_grid),
|
||||
GTK_WIDGET(child->data));
|
||||
gtk_container_remove(GTK_CONTAINER(mimeview->icon_grid),
|
||||
GTK_WIDGET(child->data));
|
||||
}
|
||||
g_list_free(orig);
|
||||
mimeview->icon_count = 0;
|
||||
|
@ -2821,8 +2821,8 @@ static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
|
|||
gtk_paned_set_position(GTK_PANED(mimeview->paned),
|
||||
prefs_common.mimeview_tree_height);
|
||||
|
||||
gtkut_container_remove(GTK_CONTAINER(mimeview->icon_mainbox),
|
||||
button);
|
||||
gtk_container_remove(GTK_CONTAINER(mimeview->icon_mainbox),
|
||||
button);
|
||||
gtk_box_pack_end(GTK_BOX(mimeview->ctree_mainbox),
|
||||
button, FALSE, FALSE, 0);
|
||||
} else {
|
||||
|
@ -2832,8 +2832,8 @@ static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
|
|||
gtk_widget_show(mimeview->icon_mainbox);
|
||||
gtk_paned_set_position(GTK_PANED(mimeview->paned), 0);
|
||||
|
||||
gtkut_container_remove(GTK_CONTAINER(mimeview->ctree_mainbox),
|
||||
button);
|
||||
gtk_container_remove(GTK_CONTAINER(mimeview->ctree_mainbox),
|
||||
button);
|
||||
gtk_box_pack_start(GTK_BOX(mimeview->icon_mainbox),
|
||||
button, FALSE, FALSE, 0);
|
||||
gtk_box_reorder_child(GTK_BOX(gtk_widget_get_parent(button)), button, 0);
|
||||
|
|
|
@ -861,9 +861,9 @@ void summary_relayout(SummaryView *summaryview)
|
|||
g_object_ref(summaryview->hbox_l);
|
||||
g_object_ref(summaryview->statlabel_msgs);
|
||||
|
||||
gtkut_container_remove(GTK_CONTAINER(
|
||||
gtk_container_remove(GTK_CONTAINER(
|
||||
gtk_widget_get_parent(summaryview->hbox_l)), summaryview->hbox_l);
|
||||
gtkut_container_remove(GTK_CONTAINER(
|
||||
gtk_container_remove(GTK_CONTAINER(
|
||||
gtk_widget_get_parent(summaryview->statlabel_msgs)), summaryview->statlabel_msgs);
|
||||
|
||||
switch (prefs_common.layout_mode) {
|
||||
|
|
Loading…
Reference in a new issue