From 37a85e35448f8beed2654a4df07a303283a86aac Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 12 Feb 2020 23:24:27 +0100 Subject: stickynotes: Use gresources for UI files --- configure.ac | 20 +- po/POTFILES.in | 6 +- stickynotes/Makefile.am | 95 +- stickynotes/sticky-notes-delete-all.ui | 153 +++ stickynotes/sticky-notes-delete.ui | 154 +++ stickynotes/sticky-notes-note.ui | 172 +++ stickynotes/sticky-notes-preferences.ui | 414 ++++++++ stickynotes/sticky-notes-properties.ui | 277 +++++ stickynotes/sticky-notes-resources.gresource.xml | 10 + stickynotes/stickynotes.c | 5 +- stickynotes/stickynotes.ui | 1208 ---------------------- stickynotes/stickynotes_applet.c | 2 +- stickynotes/stickynotes_applet.h | 1 - stickynotes/stickynotes_applet_callbacks.c | 2 +- 14 files changed, 1269 insertions(+), 1250 deletions(-) create mode 100644 stickynotes/sticky-notes-delete-all.ui create mode 100644 stickynotes/sticky-notes-delete.ui create mode 100644 stickynotes/sticky-notes-note.ui create mode 100644 stickynotes/sticky-notes-preferences.ui create mode 100644 stickynotes/sticky-notes-properties.ui create mode 100644 stickynotes/sticky-notes-resources.gresource.xml delete mode 100644 stickynotes/stickynotes.ui diff --git a/configure.ac b/configure.ac index 060c65d0..5839f41c 100644 --- a/configure.ac +++ b/configure.ac @@ -228,10 +228,28 @@ AC_SUBST(LIBMATEWEATHER_LIBS) AM_CONDITIONAL(BUILD_LIBMATEWEATHER_APPLETS, $build_libmateweather_applets) dnl *************************************************************************** -dnl *** GSettings *** +dnl *** GSettings *** dnl *************************************************************************** GLIB_GSETTINGS +dnl *************************************************************************** +dnl *** GLIB_COMPILE_RESOURCES *** +dnl *************************************************************************** +AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[glib-compile-resources bin]) +AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[]) +if test -z "$GLIB_COMPILE_RESOURCES"; then + AC_MSG_ERROR([glib-compile-resources not found]) +fi + +dnl *************************************************************************** +dnl *** XMLLINT *** +dnl *************************************************************************** +AC_ARG_VAR([XMLLINT],[xmllint bin]) +AC_PATH_PROG([XMLLINT],[xmllint],[]) +if test -z "$XMLLINT"; then + AC_MSG_ERROR([xmllint not found]) +fi + dnl *************************************************************************** dnl *** Set up gettext *** dnl *************************************************************************** diff --git a/po/POTFILES.in b/po/POTFILES.in index a971cd6a..74a2dbe4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -53,7 +53,11 @@ netspeed/src/netspeed.c # NB. these are actually separate files stickynotes/org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in.in stickynotes/stickynotes.c -stickynotes/stickynotes.ui +stickynotes/sticky-notes-delete-all.ui +stickynotes/sticky-notes-delete.ui +stickynotes/sticky-notes-note.ui +stickynotes/sticky-notes-preferences.ui +stickynotes/sticky-notes-properties.ui stickynotes/org.mate.stickynotes.gschema.xml.in stickynotes/stickynotes_applet.c stickynotes/stickynotes_applet_callbacks.c diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am index 04e79144..9adf21ae 100644 --- a/stickynotes/Makefile.am +++ b/stickynotes/Makefile.am @@ -1,9 +1,14 @@ -## Process this file with automake to produce Makefile.in - SUBDIRS = pixmaps docs ui_files = stickynotes-applet-menu.xml -builder_files = stickynotes.ui +builder_files = \ + sticky-notes-delete.ui \ + sticky-notes-delete-all.ui \ + sticky-notes-note.ui \ + sticky-notes-preferences.ui \ + sticky-notes-properties.ui \ + $(NULL) + applet_in_files = org.mate.applets.StickyNotesApplet.mate-panel-applet.desktop.in service_in_files = org.mate.panel.applet.StickyNotesAppletFactory.service.in schemas_in_files = stickynotes.schemas.in @@ -12,36 +17,40 @@ if BUILD_STICKYNOTES_APPLET AM_CPPFLAGS = \ -I. \ -I$(srcdir) \ - $(STICKYNOTES_CFLAGS) \ - $(MATE_APPLETS4_CFLAGS) \ - $(MATEDESKTOP_CFLAGS) \ + $(STICKYNOTES_CFLAGS) \ + $(MATE_APPLETS4_CFLAGS) \ + $(MATEDESKTOP_CFLAGS) \ $(LIBWNCK_CFLAGS) \ $(XML2_CFLAGS) \ - -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\" + -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\" \ + -DGRESOURCE=\""/org/mate/mate-applets/sticky-notes/\"" \ + $(NULL) libexec_PROGRAMS = stickynotes-applet -stickynotes_applet_SOURCES = \ - util.h \ - util.c \ - stickynotes.h \ - stickynotes_callbacks.h \ - stickynotes_applet.h \ - stickynotes_applet_callbacks.h \ - stickynotes.c \ - stickynotes_callbacks.c \ - stickynotes_applet.c \ - stickynotes_applet_callbacks.c - -stickynotes_applet_LDADD = \ - $(STICKYNOTES_LIBS) \ - $(MATE_APPLETS4_LIBS) \ - $(MATEDESKTOP_LIBS) \ - $(LIBWNCK_LIBS) \ - $(XML2_LIBS) \ - -lX11 - -builder_DATA = $(builder_files) +stickynotes_applet_SOURCES = \ + util.h \ + util.c \ + stickynotes.h \ + stickynotes_callbacks.h \ + stickynotes_applet.h \ + stickynotes_applet_callbacks.h \ + stickynotes.c \ + stickynotes_callbacks.c \ + stickynotes_applet.c \ + stickynotes_applet_callbacks.c \ + sticky-notes-resources.c \ + sticky-notes-resources.h \ + $(NULL) + +stickynotes_applet_LDADD = \ + $(STICKYNOTES_LIBS) \ + $(MATE_APPLETS4_LIBS) \ + $(MATEDESKTOP_LIBS) \ + $(LIBWNCK_LIBS) \ + $(XML2_LIBS) \ + -lX11 \ + $(NULL) uidir = $(datadir)/mate/ui ui_DATA = $(ui_files) @@ -50,6 +59,12 @@ stickynotes_gschema_in_files = org.mate.stickynotes.gschema.xml.in gsettings_SCHEMAS = $(stickynotes_gschema_in_files:.xml.in=.xml) @GSETTINGS_RULES@ +sticky-notes-resources.c: sticky-notes-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/sticky-notes-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name sticky_notes $< + +sticky-notes-resources.h: sticky-notes-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/sticky-notes-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name sticky_notes $< + appletdir = $(datadir)/mate-panel/applets applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet) @@ -70,16 +85,26 @@ org.mate.panel.applet.StickyNotesAppletFactory.service: $(service_in_files) -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ $< > $@ -CLEANFILES = $(applet_DATA) $(applet_in_files) $(service_DATA) $(gsettings_SCHEMAS) *.gschema.valid +CLEANFILES = \ + $(applet_DATA) \ + $(applet_in_files) \ + $(service_DATA) \ + $(gsettings_SCHEMAS) \ + sticky-notes-resources.c \ + sticky-notes-resources.h \ + *.gschema.valid \ + $(NULL) endif -EXTRA_DIST = \ - $(builder_files) \ - $(ui_files) \ - $(stickynotes_gschema_in_files) \ - $(service_in_files) \ - $(applet_in_files).in +EXTRA_DIST = \ + $(builder_files) \ + $(ui_files) \ + $(stickynotes_gschema_in_files) \ + $(service_in_files) \ + $(applet_in_files).in \ + sticky-notes-resources.gresource.xml \ + $(NULL) -include $(top_srcdir)/git.mk diff --git a/stickynotes/sticky-notes-delete-all.ui b/stickynotes/sticky-notes-delete-all.ui new file mode 100644 index 00000000..1562023e --- /dev/null +++ b/stickynotes/sticky-notes-delete-all.ui @@ -0,0 +1,153 @@ + + + + + + True + False + process-stop + + + True + False + edit-delete + + + False + 5 + False + dialog + + + + + + True + False + vertical + 14 + + + True + False + end + + + _Cancel + True + True + True + False + image_cancel + True + True + + + False + False + 0 + + + + + _Delete All + True + True + True + False + image_delete + True + True + + + False + False + 1 + + + + + False + False + end + 0 + + + + + True + False + 5 + 12 + + + True + False + start + 48 + dialog-warning + 6 + + + False + False + 0 + + + + + True + False + vertical + + + True + False + Delete all sticky notes? + 0 + 0 + + + + + + False + False + 0 + + + + + True + False + This cannot be undone. + 0 + + + True + True + 1 + + + + + False + False + 1 + + + + + False + False + 1 + + + + + + button3 + button4 + + + diff --git a/stickynotes/sticky-notes-delete.ui b/stickynotes/sticky-notes-delete.ui new file mode 100644 index 00000000..c5a1a82c --- /dev/null +++ b/stickynotes/sticky-notes-delete.ui @@ -0,0 +1,154 @@ + + + + + + True + False + process-stop + + + True + False + edit-delete + + + False + 5 + False + True + dialog + + + + + + True + False + vertical + 14 + + + True + False + end + + + _Cancel + True + True + True + False + image_cancel + True + True + + + False + False + 0 + + + + + _Delete + True + True + True + False + image_delete + True + True + + + False + False + 1 + + + + + False + False + end + 0 + + + + + True + False + 5 + 12 + + + True + False + start + 48 + dialog-warning + 6 + + + False + False + 0 + + + + + True + False + vertical + + + True + False + Delete this sticky note? + 0 + 0 + + + + + + False + False + 0 + + + + + True + False + This cannot be undone. + 0 + + + True + True + 1 + + + + + False + False + 1 + + + + + False + False + 1 + + + + + + button1 + button2 + + + diff --git a/stickynotes/sticky-notes-note.ui b/stickynotes/sticky-notes-note.ui new file mode 100644 index 00000000..4426c659 --- /dev/null +++ b/stickynotes/sticky-notes-note.ui @@ -0,0 +1,172 @@ + + + + + + + -1 + + + False + Sticky Note + + + + + + True + False + vertical + + + True + False + + + True + False + Lock/Unlock note + none + + + True + False + gtk-missing-image + + + + + False + False + 0 + + + + + True + False + 2 + 2 + True + center + + + + True + True + 1 + + + + + True + False + Delete note + none + + + True + False + gtk-missing-image + + + + + False + False + 2 + + + + + False + False + 0 + + + + + True + True + never + never + + + True + True + word + 4 + 4 + body_buffer + + + + + True + True + 1 + + + + + False + + + True + False + Resize note + + + True + False + 1 + 1 + 1 + 1 + gtk-missing-image + + + + + False + False + 0 + + + + + True + False + Resize note + + + True + False + 1 + 1 + 1 + 1 + gtk-missing-image + + + + + False + False + end + 1 + + + + + False + False + 2 + + + + + + diff --git a/stickynotes/sticky-notes-preferences.ui b/stickynotes/sticky-notes-preferences.ui new file mode 100644 index 00000000..dcb5731f --- /dev/null +++ b/stickynotes/sticky-notes-preferences.ui @@ -0,0 +1,414 @@ + + + + + + 1 + 500 + 1 + 10 + 100 + + + 1 + 500 + 1 + 10 + 100 + + + True + False + window-close + + + True + False + help-browser + + + False + 5 + Sticky Notes Preferences + False + dialog + + + + + + True + False + vertical + 2 + + + True + False + end + + + _Help + True + True + True + False + image_help + True + True + + + False + False + 0 + + + + + _Close + True + True + True + False + image_close + True + True + + + False + False + 1 + + + + + False + False + end + 0 + + + + + True + False + 5 + vertical + 18 + + + True + False + vertical + 6 + + + True + False + Default Note Properties + 0 + + + + + + False + False + 0 + + + + + True + False + 12 + 6 + 12 + + + True + False + _Width: + True + 0 + + + 0 + 0 + + + + + True + False + H_eight: + True + 0 + + + 0 + 1 + + + + + True + True + Specify the default width (in pixels) of new notes + 1 + adjustment1 + 1 + True + + + 1 + 0 + + + + + True + True + Specify the default height (in pixels) of new notes + 0 + adjustment2 + 1 + True + + + 1 + 1 + + + + + Use co_lor from the system theme + True + True + False + start + True + True + + + 0 + 2 + 2 + + + + + True + False + Font Co_lor: + True + 0 + + + 0 + 3 + + + + + True + False + Note C_olor: + True + 0 + + + 0 + 4 + + + + + True + True + False + + + 1 + 3 + + + + + True + True + False + Choose a base color to use for all sticky notes + Pick a default sticky note color + + + 1 + 4 + + + + + Use fo_nt from the system theme + True + True + False + start + True + True + + + 0 + 5 + 2 + + + + + True + False + _Font: + True + 0 + + + 0 + 6 + + + + + True + True + False + Choose a font to use for all sticky notes + Sans 12 + Pick a default sticky note font + + + 1 + 6 + + + + + False + True + 1 + + + + + False + False + 0 + + + + + True + False + vertical + 6 + + + True + False + Behavior + 0 + + + + + + False + False + 0 + + + + + True + False + 12 + 6 + 12 + + + _Put notes on all workspaces + True + True + False + Choose if notes are visible on all workspaces + start + True + True + + + 0 + 0 + 2 + + + + + Force _default color and font on notes + True + True + False + Choose if the default style is forced on all notes + start + True + True + + + 0 + 1 + 2 + + + + + Hide notes when the des_ktop is clicked on + True + True + True + Choose whether to hide all notes when selecting on the desktop + start + True + True + + + 0 + 2 + 2 + + + + + False + True + 1 + + + + + False + False + 1 + + + + + False + False + 1 + + + + + + helpbutton1 + closebutton1 + + + diff --git a/stickynotes/sticky-notes-properties.ui b/stickynotes/sticky-notes-properties.ui new file mode 100644 index 00000000..3602821b --- /dev/null +++ b/stickynotes/sticky-notes-properties.ui @@ -0,0 +1,277 @@ + + + + + + True + False + window-close + + + True + False + help-browser + + + False + 5 + Sticky Note Properties + False + dialog + + + + + + True + False + vertical + 2 + + + True + False + end + + + _Help + True + True + True + False + image_help + True + True + + + False + False + 0 + + + + + _Close + True + True + True + False + image_close + True + True + + + False + False + 1 + + + + + False + False + end + 0 + + + + + True + False + 5 + vertical + 18 + + + True + False + vertical + 6 + + + True + False + Properties + 0 + + + + + + False + False + 0 + + + + + True + False + 12 + 6 + 12 + + + True + False + _Title: + True + 0 + + + 0 + 0 + + + + + True + True + Specify a title for the note + + + 1 + 0 + + + + + Use default co_lor + True + True + False + start + True + True + + + 0 + 1 + 2 + + + + + True + False + 12 + Font C_olor: + True + 0 + + + 0 + 2 + + + + + True + False + 12 + Note _Color: + True + 0 + + + 0 + 3 + + + + + Use default fo_nt + True + True + False + start + True + True + + + 0 + 4 + 2 + + + + + True + True + False + + + 1 + 2 + + + + + True + True + False + Choose a color for the note + Pick a color for the sticky note + + + 1 + 3 + + + + + True + False + 12 + _Font: + True + 0 + + + 0 + 5 + + + + + True + True + False + Choose a font for the note + Sans 12 + Pick a font for the sticky note + + + 1 + 5 + + + + + False + True + 1 + + + + + False + False + 0 + + + + + False + False + 1 + + + + + + helpbutton2 + closebutton2 + + + diff --git a/stickynotes/sticky-notes-resources.gresource.xml b/stickynotes/sticky-notes-resources.gresource.xml new file mode 100644 index 00000000..8157b9a4 --- /dev/null +++ b/stickynotes/sticky-notes-resources.gresource.xml @@ -0,0 +1,10 @@ + + + + sticky-notes-delete.ui + sticky-notes-delete-all.ui + sticky-notes-note.ui + sticky-notes-preferences.ui + sticky-notes-properties.ui + + diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index dd0a4fc5..f8d9ebb1 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -105,7 +105,8 @@ stickynote_new_aux (GdkScreen *screen, gint x, gint y, gint w, gint h) note = g_new (StickyNote, 1); builder = gtk_builder_new (); - gtk_builder_add_from_file (builder, BUILDER_PATH, NULL); + gtk_builder_add_from_resource (builder, GRESOURCE "sticky-notes-note.ui", NULL); + gtk_builder_add_from_resource (builder, GRESOURCE "sticky-notes-properties.ui", NULL); note->w_window = GTK_WIDGET (gtk_builder_get_object (builder, "stickynote_window")); gtk_window_set_screen(GTK_WINDOW(note->w_window),screen); @@ -659,7 +660,7 @@ void stickynotes_remove(StickyNote *note) GtkWidget *dialog; builder = gtk_builder_new (); - gtk_builder_add_from_file (builder, BUILDER_PATH, NULL); + gtk_builder_add_from_resource (builder, GRESOURCE "sticky-notes-delete.ui", NULL); dialog = GTK_WIDGET (gtk_builder_get_object (builder, "delete_dialog")); diff --git a/stickynotes/stickynotes.ui b/stickynotes/stickynotes.ui deleted file mode 100644 index 3df63c99..00000000 --- a/stickynotes/stickynotes.ui +++ /dev/null @@ -1,1208 +0,0 @@ - - - - - - - 1 - 1 - 500 - 10 - 100 - - - 1 - 1 - 500 - 10 - 100 - - - - - - - popup_create - _New Note - - - - - popup_destroy - _Delete Note... - - - - - popup_toggle_lock - _Lock Note - - - - - popup_properties - _Properties - - - - - - - - - - - - - - - - - 5 - Sticky Notes Preferences - False - dialog - - - True - 2 - - - True - 5 - 18 - - - True - 6 - - - True - 0 - Default Note Properties - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 7 - 2 - 12 - 6 - - - True - True - False - Choose a font to use for all sticky notes - Pick a default sticky note font - - - 1 - 2 - 6 - 7 - GTK_FILL - - - - - - True - 16 - - - True - 0 - _Font: - True - default_font - - - - - 6 - 7 - GTK_FILL - - - - - Use fo_nt from the system theme - True - True - False - True - True - - - 2 - 5 - 6 - GTK_FILL - - - - - - True - 16 - - - True - 0 - Note C_olor: - True - default_color - - - - - 4 - 5 - GTK_FILL - GTK_FILL - - - - - True - 16 - - - True - 0 - Font Co_lor: - True - font_color - - - - - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - True - False - - - 1 - 2 - 3 - 4 - GTK_FILL - - - - - - True - True - False - Choose a base color to use for all sticky notes - Pick a default sticky note color - - - 1 - 2 - 4 - 5 - - - - - - Use co_lor from the system theme - True - True - False - True - True - - - 2 - 2 - 3 - GTK_FILL - - - - - - True - True - Specify the default height (in pixels) of new notes - adjustment1 - 1 - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - Specify the default width (in pixels) of new notes - adjustment2 - 1 - True - - - 1 - 2 - - - - - - True - 0 - H_eight: - True - height_spin - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - _Width: - True - width_spin - - - GTK_FILL - - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - True - 6 - - - True - 0 - Behavior - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 3 - 2 - 12 - 6 - - - Hide notes when the des_ktop is clicked on - True - True - True - Choose whether to hide all notes when selecting on the desktop - True - True - - - 2 - 3 - 4 - - - - - - Force _default color and font on notes - True - True - False - Choose if the default style is forced on all notes - True - True - - - 2 - 2 - 3 - - - - - - _Put notes on all workspaces - True - True - False - Choose if notes are visible on all workspaces - True - True - - - 2 - 1 - 2 - - - - - - - - - - - - 1 - - - - - 1 - - - - - False - False - 1 - - - - - False - False - 1 - - - - - True - end - - - gtk-help - True - True - True - False - True - - - False - False - 0 - - - - - gtk-close - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - helpbutton1 - closebutton1 - - - - 5 - False - True - dialog - - - True - 14 - - - True - 5 - 12 - - - True - 0 - gtk-dialog-warning - 6 - - - False - False - 0 - - - - - True - vertical - - - True - 0 - 0 - Delete this sticky note? - - - - - - False - False - 0 - - - - - True - 0 - This cannot be undone. - - - 1 - - - - - False - False - 1 - - - - - False - False - 1 - - - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - gtk-delete - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - button1 - button2 - - - - 5 - False - dialog - - - True - 14 - - - True - 5 - 12 - - - True - 0 - gtk-dialog-warning - 6 - - - False - False - 0 - - - - - True - vertical - - - True - 0 - 0 - Delete all sticky notes? - - - - - - False - False - 0 - - - - - True - 0 - This cannot be undone. - - - 1 - - - - - False - False - 1 - - - - - False - False - 1 - - - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - True - True - True - False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-delete - - - False - False - 0 - - - - - True - _Delete All - True - - - False - False - 1 - - - - - - - - - False - False - 1 - - - - - False - end - 0 - - - - - - button3 - button4 - - - - -1 - - - Sticky Note - - - True - - - True - - - True - False - Lock/Unlock note - none - - - True - gtk-missing-image - - - - - False - False - 0 - - - - - True - 2 - True - center - - - 1 - - - - - True - False - Delete note - none - - - True - gtk-missing-image - - - - - False - False - 2 - - - - - False - False - 0 - - - - - True - True - never - never - - - True - True - word - 4 - 4 - body_buffer - - - - - 1 - - - - - - - True - Resize note - - - True - 0 - 1 - gtk-missing-image - - - - - False - False - 0 - - - - - True - Resize note - - - True - 1 - 1 - gtk-missing-image - - - - - False - False - end - 1 - - - - - False - False - 2 - - - - - - - - 5 - Sticky Note Properties - False - dialog - - - True - 2 - - - True - 5 - 18 - - - True - 6 - - - True - 0 - Properties - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 6 - 2 - 12 - 6 - - - True - True - False - Choose a font for the note - Pick a font for the sticky note - - - 1 - 2 - 5 - 6 - GTK_FILL - - - - - - True - 16 - - - True - 0 - _Font: - True - note_color - - - - - 5 - 6 - GTK_FILL - - - - - Use default fo_nt - True - True - False - True - True - - - 2 - 4 - 5 - GTK_FILL - - - - - - True - True - False - Choose a color for the note - Pick a color for the sticky note - - - 1 - 2 - 3 - 4 - GTK_FILL - - - - - - True - 16 - - - True - 0 - Note _Color: - True - note_color - - - - - 3 - 4 - GTK_FILL - - - - - True - True - False - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - True - 16 - - - True - 0 - Font C_olor: - True - font_color - - - - - 2 - 3 - GTK_FILL - - - - - Use default co_lor - True - True - False - True - True - - - 2 - 1 - 2 - - - - - - True - True - Specify a title for the note - - - 1 - 2 - - - - - - True - 0 - _Title: - True - title_entry - - - GTK_FILL - - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - False - False - 1 - - - - - True - end - - - gtk-help - True - True - True - False - True - - - False - False - 0 - - - - - gtk-close - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - helpbutton2 - closebutton2 - - - diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c index 70f62727..e00ba0c9 100644 --- a/stickynotes/stickynotes_applet.c +++ b/stickynotes/stickynotes_applet.c @@ -210,7 +210,7 @@ void stickynotes_applet_init_prefs(void) stickynotes->builder = gtk_builder_new (); - gtk_builder_add_from_file (stickynotes->builder, BUILDER_PATH, NULL); + gtk_builder_add_from_resource (stickynotes->builder, GRESOURCE "sticky-notes-preferences.ui", NULL); stickynotes->w_prefs = GTK_WIDGET (gtk_builder_get_object (stickynotes->builder, "preferences_dialog")); diff --git a/stickynotes/stickynotes_applet.h b/stickynotes/stickynotes_applet.h index 18364655..4d10c387 100644 --- a/stickynotes/stickynotes_applet.h +++ b/stickynotes/stickynotes_applet.h @@ -28,7 +28,6 @@ #define STICKYNOTES_SCHEMA "org.mate.stickynotes" -#define BUILDER_PATH GTK_BUILDERDIR "/stickynotes.ui" #define STICKYNOTES_STOCK_LOCKED "stickynotes-stock-locked" #define STICKYNOTES_STOCK_UNLOCKED "stickynotes-stock-unlocked" diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index e5c552e7..5ab1d7b0 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -290,7 +290,7 @@ void menu_destroy_all_cb(GtkAction *action, StickyNotesApplet *applet) GtkBuilder *builder; builder = gtk_builder_new (); - gtk_builder_add_from_file (builder, BUILDER_PATH, NULL); + gtk_builder_add_from_resource (builder, GRESOURCE "sticky-notes-delete-all.ui", NULL); if (applet->destroy_all_dialog != NULL) { gtk_window_set_screen (GTK_WINDOW (applet->destroy_all_dialog), -- cgit v1.2.1