commit b537038c0c45eb0092a17e7d96bc849141540744
parent fcd3988a1117d46cd7a2b708d9feb6cb79d1ee4d
Author: paul <paul@claws-mail.org>
Date: Wed, 4 Dec 2019 09:38:28 +0000
replace dprecated gtk_widget_reparent(), and remove useless gtkut_container_remove()
Diffstat:
5 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
@@ -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,
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
@@ -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,
diff --git a/src/mainwindow.c b/src/mainwindow.c
@@ -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);
diff --git a/src/mimeview.c b/src/mimeview.c
@@ -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);
diff --git a/src/summaryview.c b/src/summaryview.c
@@ -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) {