pidgin.vv: 337d7215: Rearrange the Pidgin media GUI.
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Wed Jan 14 04:42:01 EST 2009
-----------------------------------------------------------------
Revision: 337d72150b074af2403e7a2bd84b3e501de96e50
Ancestor: 382f9ff3bf308b5459a4f1e9aeb654ff849e7aa7
Author: maiku at soc.pidgin.im
Date: 2009-01-14T09:20:07
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/337d72150b074af2403e7a2bd84b3e501de96e50
Modified files:
pidgin/gtkconv.c pidgin/gtkconv.h pidgin/gtkmedia.c
ChangeLog:
Rearrange the Pidgin media GUI.
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c bdc996787c8fb4812ed6663b2dbd333fb7e231b6
+++ pidgin/gtkconv.c 41c7c90564312e3f7d85b06deb238c1dfb7ee1e7
@@ -4803,7 +4803,7 @@ setup_common_pane(PidginConversation *gt
static GtkWidget *
setup_common_pane(PidginConversation *gtkconv)
{
- GtkWidget *vbox, *hpaned, *frame, *imhtml_sw, *event_box;
+ GtkWidget *vbox, *frame, *imhtml_sw, *event_box;
GtkCellRenderer *rend;
GtkTreePath *path;
PurpleConversation *conv = gtkconv->active_conv;
@@ -4813,7 +4813,10 @@ setup_common_pane(PidginConversation *gt
int buddyicon_size = 0;
/* Setup the top part of the pane */
- gtkconv->topvbox = vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+ gtkconv->tophbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+ gtk_widget_show(gtkconv->tophbox);
+ vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+ gtk_box_pack_start(GTK_BOX(gtkconv->tophbox), vbox, TRUE, TRUE, 0);
gtk_widget_show(vbox);
/* Setup the info pane */
@@ -4883,21 +4886,23 @@ setup_common_pane(PidginConversation *gt
/* Setup the gtkimhtml widget */
frame = pidgin_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw);
gtk_widget_set_size_request(gtkconv->imhtml, -1, 0);
+ if (chat) {
+ GtkWidget *hpaned;
- /* Add the gtkimhtml frame */
- gtkconv->middle_hpaned = hpaned = gtk_hpaned_new();
- gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 0);
- gtk_widget_show(hpaned);
- gtk_paned_pack1(GTK_PANED(hpaned), frame, TRUE, TRUE);
-
- if (chat) {
/* Add the topic */
setup_chat_topic(gtkconv, vbox);
+ /* Add the gtkimhtml frame */
+ hpaned = gtk_hpaned_new();
+ gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 0);
+ gtk_widget_show(hpaned);
+ gtk_paned_pack1(GTK_PANED(hpaned), frame, TRUE, TRUE);
+
/* Now add the userlist */
setup_chat_userlist(gtkconv, hpaned);
+ } else {
+ gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
}
-
gtk_widget_show(frame);
gtk_widget_set_name(gtkconv->imhtml, "pidgin_conv_imhtml");
@@ -4960,7 +4965,7 @@ setup_common_pane(PidginConversation *gt
default_formatize(gtkconv);
g_signal_connect_after(G_OBJECT(gtkconv->entry), "format_function_clear",
G_CALLBACK(clear_formatting_cb), gtkconv);
- return vbox;
+ return gtkconv->tophbox;
}
static void
@@ -7822,7 +7827,7 @@ pidgin_conv_new_media_cb(PurpleMediaMana
gtkmedia = pidgin_media_new(media, screenname);
g_object_unref(media);
- gtk_box_pack_start(GTK_BOX(gtkconv->topvbox), gtkmedia, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(gtkconv->tophbox), gtkmedia, FALSE, FALSE, 0);
gtk_widget_show(gtkmedia);
g_signal_connect(G_OBJECT(gtkmedia), "message", G_CALLBACK(pidgin_gtkmedia_message_cb), conv);
g_signal_connect(G_OBJECT(gtkmedia), "error", G_CALLBACK(pidgin_gtkmedia_error_cb), conv);
@@ -7831,8 +7836,9 @@ pidgin_conv_new_media_cb(PurpleMediaMana
g_signal_connect(G_OBJECT(gtkmedia), "destroy", G_CALLBACK(
pidgin_conv_gtkmedia_destroyed), gtkconv);
- gtk_paned_pack2(GTK_PANED(gtkconv->middle_hpaned),
- pidgin_media_get_display_widget(gtkmedia), FALSE, TRUE);
+ gtk_box_pack_start(GTK_BOX(gtkmedia),
+ pidgin_media_get_display_widget(gtkmedia),
+ TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
pidgin_conv_update_buttons_by_protocol(conv);
return TRUE;
============================================================
--- pidgin/gtkconv.h f9461a82b491a0f24d8e8ab85f1a24626e39784e
+++ pidgin/gtkconv.h 51b68e5d5cd5c87af82ee72cc070977815795f5b
@@ -150,7 +150,6 @@ struct _PidginConversation
gpointer depr1;
#endif
- GtkWidget *middle_hpaned;
GtkWidget *lower_hbox;
GtkWidget *toolbar;
@@ -170,7 +169,7 @@ struct _PidginConversation
GtkWidget *infopane;
GtkListStore *infopane_model;
GtkTreeIter infopane_iter;
- GtkWidget *topvbox;
+ GtkWidget *tophbox;
GtkWidget *gtkmedia;
/* Used when attaching a PidginConversation to a PurpleConversation
============================================================
--- pidgin/gtkmedia.c b08181c19e76495f954d3d0bfeea1f63359080ea
+++ pidgin/gtkmedia.c c6160446549a609cc01d85c835d4516add6bc79a
@@ -120,7 +120,7 @@ pidgin_media_get_type(void)
(GInstanceInitFunc) pidgin_media_init,
NULL
};
- type = g_type_register_static(GTK_TYPE_HBOX, "PidginMedia", &info, 0);
+ type = g_type_register_static(GTK_TYPE_VBOX, "PidginMedia", &info, 0);
}
return type;
}
@@ -195,11 +195,11 @@ pidgin_media_init (PidginMedia *media)
g_signal_connect(media->priv->mute, "toggled",
G_CALLBACK(pidgin_media_mute_toggled), media);
- gtk_box_pack_start(GTK_BOX(media), media->priv->calling, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(media), media->priv->hangup, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(media), media->priv->accept, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(media), media->priv->reject, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(media), media->priv->reject, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(media), media->priv->accept, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(media), media->priv->hangup, FALSE, FALSE, 0);
gtk_box_pack_end(GTK_BOX(media), media->priv->mute, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(media), media->priv->calling, FALSE, FALSE, 0);
gtk_widget_show_all(media->priv->accept);
gtk_widget_show_all(media->priv->reject);
@@ -307,11 +307,6 @@ pidgin_media_finalize(GObject *media)
PidginMedia *gtkmedia = PIDGIN_MEDIA(media);
purple_debug_info("gtkmedia", "pidgin_media_finalize\n");
- if (gtkmedia->priv->display) {
- gtk_widget_destroy(gtkmedia->priv->display);
- gtkmedia->priv->display = NULL;
- }
-
G_OBJECT_CLASS(parent_class)->finalize(media);
}
More information about the Commits
mailing list