[Xfce4-commits] r25410 - squeeze/trunk/src
Stephan Arts
stephan at xfce.org
Sat Apr 7 01:01:32 CEST 2007
Author: stephan
Date: 2007-04-06 23:01:32 +0000 (Fri, 06 Apr 2007)
New Revision: 25410
Modified:
squeeze/trunk/src/main_window.c
squeeze/trunk/src/notebook.c
Log:
fix throbber layout
Modified: squeeze/trunk/src/main_window.c
===================================================================
--- squeeze/trunk/src/main_window.c 2007-04-06 19:34:10 UTC (rev 25409)
+++ squeeze/trunk/src/main_window.c 2007-04-06 23:01:32 UTC (rev 25410)
@@ -1021,6 +1021,7 @@
message = _("Done");
if(window->menu_bar)
{
+ sq_throbber_set_animated(SQ_THROBBER(window->throbber), FALSE);
gtk_widget_set_sensitive(window->menubar.menu_item_add, TRUE);
gtk_widget_set_sensitive(window->menubar.menu_item_extract, TRUE);
gtk_widget_set_sensitive(window->menubar.menu_item_remove, TRUE);
@@ -1038,6 +1039,7 @@
{
if(window->menu_bar)
{
+ sq_throbber_set_animated(SQ_THROBBER(window->throbber), TRUE);
gtk_widget_set_sensitive(window->menubar.menu_item_add, FALSE);
gtk_widget_set_sensitive(window->menubar.menu_item_extract, FALSE);
gtk_widget_set_sensitive(window->menubar.menu_item_remove, FALSE);
Modified: squeeze/trunk/src/notebook.c
===================================================================
--- squeeze/trunk/src/notebook.c 2007-04-06 19:34:10 UTC (rev 25409)
+++ squeeze/trunk/src/notebook.c 2007-04-06 23:01:32 UTC (rev 25410)
@@ -499,6 +499,12 @@
GtkWidget *label = gtk_label_new(lsq_archive_get_filename(archive));
GtkWidget *archive_image = gtk_image_new_from_icon_name("unknown", GTK_ICON_SIZE_MENU);
GtkWidget *throbber = sq_throbber_new();
+ GtkWidget *alignment = gtk_alignment_new(0.5,0.5,1,1);
+
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 4, 0, 0, 0);
+
+ gtk_container_add(GTK_CONTAINER(alignment), throbber);
+
/*thunar_vfs_mime_info_lookup_icon_name(lsq_archive_get_mimetype(archive), notebook->icon_theme), GTK_ICON_SIZE_MENU);*/
GtkWidget *close_button = gtk_button_new();
GtkWidget *close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
@@ -509,6 +515,8 @@
gtk_button_set_image(GTK_BUTTON(close_button), close_image);
gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
+// gtk_widget_set_size_request(lbl_hbox, -1, 20);
+
gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_MIDDLE);
gtk_label_set_max_width_chars(GTK_LABEL(label), 20);
gtk_tooltips_set_tip(notebook->tool_tips, label, lsq_archive_get_filename(archive), NULL);
@@ -527,7 +535,7 @@
g_signal_connect(G_OBJECT(tree_model), "notify", G_CALLBACK(cb_sq_notebook_notify_proxy), notebook);
gtk_box_pack_start(GTK_BOX(lbl_hbox), archive_image, FALSE, FALSE, 3);
- gtk_box_pack_start(GTK_BOX(lbl_hbox), throbber, FALSE, FALSE, 3);
+ gtk_box_pack_start(GTK_BOX(lbl_hbox), alignment, FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(lbl_hbox), label, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(lbl_hbox), close_button, FALSE, FALSE, 0);
gtk_widget_show_all(lbl_hbox);
@@ -645,13 +653,13 @@
if(lsq_archive_get_status(archive))
{
gtk_widget_hide(GTK_WIDGET(children->data));
- sq_throbber_set_animated(SQ_THROBBER(children->next->data), TRUE);
+ sq_throbber_set_animated(SQ_THROBBER(gtk_bin_get_child(GTK_BIN(children->next->data))), TRUE);
gtk_widget_show(GTK_WIDGET(children->next->data));
}
else
{
gtk_widget_show(GTK_WIDGET(children->data));
- sq_throbber_set_animated(SQ_THROBBER(children->next->data), FALSE);
+ sq_throbber_set_animated(SQ_THROBBER(gtk_bin_get_child(GTK_BIN(children->next->data))), FALSE);
gtk_widget_hide(GTK_WIDGET(children->next->data));
}
More information about the Xfce4-commits
mailing list