[Gpa-commits] r807 - trunk/src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Feb 6 15:52:48 CET 2008
Author: marcus
Date: 2008-02-06 15:52:47 +0100 (Wed, 06 Feb 2008)
New Revision: 807
Modified:
trunk/src/ChangeLog
trunk/src/clipboard.c
trunk/src/fileman.c
Log:
2008-02-06 Marcus Brinkmann <marcus at g10code.de>
* clipboard.c (gpa_clipboard_constructor): Add a fancy label after
the toolbar.
* fileman.c (gpa_file_manager_constructor): Add a fancy label
after the toolbar.
(file_list_new): Put a shadow around the scrollerFile.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-02-06 14:34:20 UTC (rev 806)
+++ trunk/src/ChangeLog 2008-02-06 14:52:47 UTC (rev 807)
@@ -1,5 +1,11 @@
2008-02-06 Marcus Brinkmann <marcus at g10code.de>
+ * clipboard.c (gpa_clipboard_constructor): Add a fancy label after
+ the toolbar.
+ * fileman.c (gpa_file_manager_constructor): Add a fancy label
+ after the toolbar.
+ (file_list_new): Put a shadow around the scrollerFile.
+
* confdialog.c (create_dialog_tabs_2) [!GTK_CHECK_VERSION(2,12,0)]:
Do not add tooltips.
Modified: trunk/src/clipboard.c
===================================================================
--- trunk/src/clipboard.c 2008-02-06 14:34:20 UTC (rev 806)
+++ trunk/src/clipboard.c 2008-02-06 14:52:47 UTC (rev 807)
@@ -1025,10 +1025,16 @@
GObject *object;
GpaClipboard *clipboard;
GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *icon;
+ GtkWidget *label;
+ gchar *markup;
GtkWidget *menubar;
GtkWidget *text_box;
GtkWidget *text_frame;
GtkWidget *toolbar;
+ GtkWidget *align;
+ guint pt, pb, pl, pr;
/* Invoke parent's constructor. */
object = parent_class->constructor (type,
@@ -1056,12 +1062,38 @@
toolbar = clipboard_toolbar_new (clipboard);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, TRUE, 0);
+
+ /* Add a fancy label that tells us: This is the clipboard. */
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 5);
+
+ /* FIXME: Need better icon. */
+ icon = gtk_image_new_from_stock ("gtk-paste", GTK_ICON_SIZE_DND);
+ gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, TRUE, 0);
+
+ label = gtk_label_new (NULL);
+ markup = g_strdup_printf ("<span font_desc=\"16\">%s</span>",
+ _("Clipboard"));
+ gtk_label_set_markup (GTK_LABEL (label), markup);
+ g_free (markup);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 10);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+
+
/* Third a text entry. */
text_box = gtk_hbox_new (TRUE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (text_box), 5);
+ align = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_alignment_get_padding (GTK_ALIGNMENT (align),
+ &pt, &pb, &pl, &pr);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (align), pt, pb + 5,
+ pl + 5, pr + 5);
+ gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
+
text_frame = clipboard_text_new (clipboard);
gtk_box_pack_start (GTK_BOX (text_box), text_frame, TRUE, TRUE, 0);
- gtk_box_pack_end (GTK_BOX (vbox), text_box, TRUE, TRUE, 0);
+ gtk_container_add (GTK_CONTAINER (align), text_box);
+ gtk_box_pack_end (GTK_BOX (vbox), align, TRUE, TRUE, 0);
+
gtk_container_add (GTK_CONTAINER (clipboard), vbox);
g_signal_connect (object, "destroy",
Modified: trunk/src/fileman.c
===================================================================
--- trunk/src/fileman.c 2008-02-06 14:34:20 UTC (rev 806)
+++ trunk/src/fileman.c 2008-02-06 14:52:47 UTC (rev 807)
@@ -800,6 +800,8 @@
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollerFile),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollerFile),
+ GTK_SHADOW_IN);
fileman->list_files = list;
gtk_widget_grab_focus (list);
@@ -826,6 +828,10 @@
GObject *object;
GpaFileManager *fileman;
GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *label;
+ GtkWidget *icon;
+ gchar *markup;
GtkWidget *menubar;
GtkWidget *file_box;
GtkWidget *file_frame;
@@ -855,6 +861,23 @@
toolbar = fileman_toolbar_new(fileman);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, TRUE, 0);
+
+ /* Add a fancy label that tells us: This is the file manager. */
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 5);
+
+ icon = gtk_image_new_from_stock ("gtk-directory", GTK_ICON_SIZE_DND);
+ gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, TRUE, 0);
+
+ label = gtk_label_new (NULL);
+ markup = g_strdup_printf ("<span font_desc=\"16\">%s</span>",
+ _("File Manager"));
+ gtk_label_set_markup (GTK_LABEL (label), markup);
+ g_free (markup);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 10);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+
+
/* Third a hbox with the file list. */
file_box = gtk_hbox_new (TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (file_box), 5);
More information about the Gpa-commits
mailing list