FreeBSD Bugzilla – Attachment 148642 Details for
Bug 165685
x11-wm/xfce4 - excessive replication of menu items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add new option in desktop item editor
libexo.diff (text/plain), 12.14 KB, created by
Olivier Duchateau
on 2014-10-25 17:41:36 UTC
(
hide
)
Description:
Add new option in desktop item editor
Filename:
MIME Type:
Creator:
Olivier Duchateau
Created:
2014-10-25 17:41:36 UTC
Size:
12.14 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (révision 371490) >+++ Makefile (copie de travail) >@@ -3,7 +3,7 @@ > > PORTNAME= libexo > PORTVERSION= 0.10.2 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= x11 xfce > MASTER_SITES= ${MASTER_SITE_XFCE} > MASTER_SITE_SUBDIR= src/xfce/exo/${PORTVERSION:R} >Index: files/patch-exo-desktop-item-edit__exo-die-desktop-model.c >=================================================================== >--- files/patch-exo-desktop-item-edit__exo-die-desktop-model.c (révision 0) >+++ files/patch-exo-desktop-item-edit__exo-die-desktop-model.c (copie de travail) >@@ -0,0 +1,35 @@ >+From 5e7ff518c12de6665bad24650e555b2c3b2304d0 Mon Sep 17 00:00:00 2001 >+From: Olivier Duchateau <duchateau.olivier@gmail.com> >+Date: Sat, 25 Oct 2014 17:43:49 +0000 >+Subject: [PATCH] Add 'Hidden' option in exo desktop item editori (bug #11249). >+ >+--- exo-desktop-item-edit/exo-die-desktop-model.c.orig 2012-12-27 12:50:31 UTC >++++ exo-desktop-item-edit/exo-die-desktop-model.c >+@@ -104,6 +104,7 @@ >+ gchar *name; >+ guint snotify : 1; >+ guint terminal : 1; >++ guint hidden : 1; >+ }; >+ >+ >+@@ -217,6 +218,7 @@ >+ >+ case EXO_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY: >+ case EXO_DIE_DESKTOP_MODEL_COLUMN_TERMINAL: >++ case EXO_DIE_DESKTOP_MODEL_COLUMN_HIDDEN: >+ return G_TYPE_BOOLEAN; >+ >+ default: >+@@ -319,6 +321,11 @@ >+ g_value_set_boolean (value, desktop_item->terminal); >+ break; >+ >++ case EXO_DIE_DESKTOP_MODEL_COLUMN_HIDDEN: >++ g_value_init (value, G_TYPE_BOOLEAN); >++ g_value_set_boolean (value, desktop_item->hidden); >++ break; >++ >+ default: >+ g_assert_not_reached (); >+ break; > >Index: files/patch-exo-desktop-item-edit__exo-die-desktop-model.h >=================================================================== >--- files/patch-exo-desktop-item-edit__exo-die-desktop-model.h (révision 0) >+++ files/patch-exo-desktop-item-edit__exo-die-desktop-model.h (copie de travail) >@@ -0,0 +1,23 @@ >+From 5e7ff518c12de6665bad24650e555b2c3b2304d0 Mon Sep 17 00:00:00 2001 >+From: Olivier Duchateau <duchateau.olivier@gmail.com> >+Date: Sat, 25 Oct 2014 17:43:49 +0000 >+Subject: [PATCH] Add 'Hidden' option in exo desktop item editori (bug #11249). >+ >+--- exo-desktop-item-edit/exo-die-desktop-model.h.orig 2012-12-27 12:50:31 UTC >++++ exo-desktop-item-edit/exo-die-desktop-model.h >+@@ -43,6 +43,7 @@ >+ * @EXO_DIE_DESKTOP_MODEL_COLUMN_NAME : the column with the application name. >+ * @EXO_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY : the column with the applications StartupNotify setting. >+ * @EXO_DIE_DESKTOP_MODEL_COLUMN_TERMINAL : the column with the applications Terminal setting. >++ * @EXO_DIE_DESKTOP_MODEL_COLUMN_HIDDEN : the column with the applications Hidden setting. >+ * >+ * The columns provided by the #ExoDieDesktopModel. >+ **/ >+@@ -55,6 +56,7 @@ >+ EXO_DIE_DESKTOP_MODEL_COLUMN_NAME, >+ EXO_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY, >+ EXO_DIE_DESKTOP_MODEL_COLUMN_TERMINAL, >++ EXO_DIE_DESKTOP_MODEL_COLUMN_HIDDEN, >+ EXO_DIE_DESKTOP_MODEL_N_COLUMNS, >+ } ExoDieDesktopModelColumn; >+ > >Index: files/patch-exo-desktop-item-edit__exo-die-editor.c >=================================================================== >--- files/patch-exo-desktop-item-edit__exo-die-editor.c (révision 0) >+++ files/patch-exo-desktop-item-edit__exo-die-editor.c (copie de travail) >@@ -0,0 +1,160 @@ >+rom 5e7ff518c12de6665bad24650e555b2c3b2304d0 Mon Sep 17 00:00:00 2001 >+From: Olivier Duchateau <duchateau.olivier@gmail.com> >+Date: Sat, 25 Oct 2014 17:43:49 +0000 >+Subject: [PATCH] Add 'Hidden' option in exo desktop item editori (bug #11249). >+ >+--- exo-desktop-item-edit/exo-die-editor.c.orig 2012-12-27 12:50:31 UTC >++++ exo-desktop-item-edit/exo-die-editor.c >+@@ -41,6 +41,7 @@ >+ PROP_PATH, >+ PROP_SNOTIFY, >+ PROP_TERMINAL, >++ PROP_HIDDEN, >+ }; >+ >+ >+@@ -89,6 +90,7 @@ >+ gchar *path; >+ guint snotify : 1; >+ guint terminal : 1; >++ guint hidden : 1; >+ }; >+ >+ >+@@ -240,6 +242,19 @@ >+ "terminal", >+ FALSE, >+ EXO_PARAM_READWRITE)); >++ >++ /** >++ * ExoDieEditor:hidden: >++ * >++ * Hide desktop item in menu. >++ **/ >++ g_object_class_install_property (gobject_class, >++ PROP_HIDDEN, >++ g_param_spec_boolean ("hidden", >++ "hidden", >++ "hidden", >++ FALSE, >++ EXO_PARAM_READWRITE)); >+ } >+ >+ >+@@ -287,7 +302,7 @@ >+ editor->path = g_strdup (""); >+ >+ /* configure the table */ >+- gtk_table_resize (GTK_TABLE (editor), 8, 2); >++ gtk_table_resize (GTK_TABLE (editor), 9, 2); >+ gtk_table_set_col_spacings (GTK_TABLE (editor), 12); >+ gtk_table_set_row_spacings (GTK_TABLE (editor), 0); >+ >+@@ -436,6 +451,14 @@ >+ exo_mutual_binding_new (G_OBJECT (editor), "terminal", G_OBJECT (button), "active"); >+ exo_binding_new_full (G_OBJECT (editor), "mode", G_OBJECT (button), "visible", exo_die_true_if_application, NULL, NULL); >+ gtk_table_attach (GTK_TABLE (editor), button, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); >++ >++ row += 1; >++ >++ /* Hidden button */ >++ button = gtk_check_button_new_with_label (_("Hide from menus")); >++ exo_mutual_binding_new (G_OBJECT (editor), "hidden", G_OBJECT (button), "active"); >++ exo_binding_new_full (G_OBJECT (editor), "mode", G_OBJECT (button), "visible", exo_die_true_if_application, NULL, NULL); >++ gtk_table_attach (GTK_TABLE (editor), button, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); >+ } >+ >+ >+@@ -508,6 +531,10 @@ >+ g_value_set_boolean (value, exo_die_editor_get_terminal (editor)); >+ break; >+ >++ case PROP_HIDDEN: >++ g_value_set_boolean (value, exo_die_editor_get_hidden (editor)); >++ break; >++ >+ default: >+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); >+ break; >+@@ -562,6 +589,10 @@ >+ exo_die_editor_set_terminal (editor, g_value_get_boolean (value)); >+ break; >+ >++ case PROP_HIDDEN: >++ exo_die_editor_set_hidden (editor, g_value_get_boolean (value)); >++ break; >++ >+ default: >+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); >+ break; >+@@ -674,6 +705,7 @@ >+ ExoDieEditor *editor = EXO_DIE_EDITOR (user_data); >+ gboolean terminal; >+ gboolean snotify; >++ gboolean hidden; >+ gchar *comment; >+ gchar *command; >+ gchar *icon; >+@@ -691,6 +723,7 @@ >+ EXO_DIE_DESKTOP_MODEL_COLUMN_NAME, &name, >+ EXO_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY, &snotify, >+ EXO_DIE_DESKTOP_MODEL_COLUMN_TERMINAL, &terminal, >++ EXO_DIE_DESKTOP_MODEL_COLUMN_HIDDEN, &hidden, >+ -1); >+ >+ /* apply the settings to the editor */ >+@@ -700,6 +733,7 @@ >+ exo_die_editor_set_icon (editor, (icon != NULL) ? icon : ""); >+ exo_die_editor_set_snotify (editor, snotify); >+ exo_die_editor_set_terminal (editor, terminal); >++ exo_die_editor_set_hidden (editor, hidden); >+ exo_die_editor_set_path (editor, ""); >+ >+ /* cleanup */ >+@@ -1333,5 +1367,46 @@ >+ >+ >+ >++/** >++ * exo_die_editor_get_hidden: >++ * @editor : an #ExoDieEditor. >++ * >++ * Returns %TRUE if the desktop item should be hidden, only valid >++ * if mode for @editor is %EXO_DIE_EDITOR_MODE_APPLICATION. >++ * >++ * Return value: %TRUE if desktop item should be hidden. >++ **/ >++gboolean >++exo_die_editor_get_hidden (ExoDieEditor *editor) >++{ >++ g_return_val_if_fail (EXO_DIE_IS_EDITOR (editor), FALSE); >++ return editor->hidden; >++} >++ >++ >++ >++/** >++ * exo_die_editor_set_hidden: >++ * @editor : an #ExoDieEditor. >++ * @hidden : %TRUE hide desktop item. >++ * >++ **/ >++void >++exo_die_editor_set_hidden (ExoDieEditor *editor, >++ gboolean hidden) >++{ >++ g_return_if_fail (EXO_DIE_IS_EDITOR (editor)); >+ >++ /* normalize the value */ >++ hidden = !!hidden; >+ >++ /* check if we have a new value */ >++ if (editor->hidden != hidden) >++ { >++ /* apply the new value */ >++ editor->hidden = hidden; >++ >++ /* notify listeners */ >++ g_object_notify (G_OBJECT (editor), "hidden"); >++ } >++} > >Index: files/patch-exo-desktop-item-edit__exo-die-editor.h >=================================================================== >--- files/patch-exo-desktop-item-edit__exo-die-editor.h (révision 0) >+++ files/patch-exo-desktop-item-edit__exo-die-editor.h (copie de travail) >@@ -0,0 +1,18 @@ >+rom 5e7ff518c12de6665bad24650e555b2c3b2304d0 Mon Sep 17 00:00:00 2001 >+From: Olivier Duchateau <duchateau.olivier@gmail.com> >+Date: Sat, 25 Oct 2014 17:43:49 +0000 >+Subject: [PATCH] Add 'Hidden' option in exo desktop item editori (bug #11249). >+ >+--- exo-desktop-item-edit/exo-die-editor.h.orig 2012-12-27 12:50:31 UTC >++++ exo-desktop-item-edit/exo-die-editor.h >+@@ -76,6 +76,10 @@ >+ void exo_die_editor_set_terminal (ExoDieEditor *editor, >+ gboolean terminal); >+ >++gboolean exo_die_editor_get_hidden (ExoDieEditor *editor); >++void exo_die_editor_set_hidden (ExoDieEditor *editor, >++ gboolean hidden); >++ >+ G_END_DECLS; >+ >+ #endif /* !__EXO_DIE_EDITOR_H__ */ > >Index: files/patch-exo-desktop-item-edit__main.c >=================================================================== >--- files/patch-exo-desktop-item-edit__main.c (révision 0) >+++ files/patch-exo-desktop-item-edit__main.c (copie de travail) >@@ -0,0 +1,27 @@ >+rom 5e7ff518c12de6665bad24650e555b2c3b2304d0 Mon Sep 17 00:00:00 2001 >+From: Olivier Duchateau <duchateau.olivier@gmail.com> >+Date: Sat, 25 Oct 2014 17:43:49 +0000 >+Subject: [PATCH] Add 'Hidden' option in exo desktop item editori (bug #11249). >+ >+--- exo-desktop-item-edit/main.c.orig 2012-12-27 12:50:31 UTC >++++ exo-desktop-item-edit/main.c >+@@ -400,6 +400,9 @@ >+ exo_die_editor_set_terminal (EXO_DIE_EDITOR (editor), >+ g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, >+ G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL)); >++ exo_die_editor_set_hidden (EXO_DIE_EDITOR (editor), >++ g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, >++ G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL)); >+ break; >+ >+ case EXO_DIE_EDITOR_MODE_LINK: >+@@ -483,6 +486,9 @@ >+ g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, >+ G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, >+ exo_die_editor_get_snotify (EXO_DIE_EDITOR (editor))); >++ g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, >++ G_KEY_FILE_DESKTOP_KEY_HIDDEN, >++ exo_die_editor_get_hidden (EXO_DIE_EDITOR (editor))); >+ break; >+ >+ case EXO_DIE_EDITOR_MODE_LINK: > >Index: pkg-plist >=================================================================== >--- pkg-plist (révision 371490) >+++ pkg-plist (copie de travail) >@@ -185,27 +185,3 @@ > share/xfce4/helpers/xfce4-terminal.desktop > share/xfce4/helpers/xfe.desktop > share/xfce4/helpers/xterm.desktop >-@dirrm share/xfce4/helpers >-@dirrmtry share/xfce4 >-@dirrm share/pixmaps/exo-1 >-%%NLS%%@dirrmtry share/locale/ur_PK/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/ur_PK >-%%NLS%%@dirrmtry share/locale/ur/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/ur >-%%NLS%%@dirrmtry share/locale/ug/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/ug >-%%NLS%%@dirrmtry share/locale/si/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/si >-%%NLS%%@dirrmtry share/locale/kk/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/kk >-%%NLS%%@dirrmtry share/locale/ast/LC_MESSAGES >-%%NLS%%@dirrmtry share/locale/ast >-%%APIDOCS%%@dirrm share/gtk-doc/html/exo-1 >-%%APIDOCS%%@dirrmtry share/gtk-doc/html >-%%APIDOCS%%@dirrmtry share/gtk-doc >-@dirrm lib/xfce4/exo-1 >-@dirrmtry lib/xfce4 >-@dirrm include/exo-1/exo >-@dirrm include/exo-1 >-@dirrmtry etc/xdg/xfce4 >-@dirrmtry etc/xdg
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165685
: 148642