diff options
Diffstat (limited to 'capplets/network')
-rw-r--r-- | capplets/network/Makefile.am | 16 | ||||
-rw-r--r-- | capplets/network/mate-network-properties.c | 10 | ||||
-rw-r--r-- | capplets/network/org.mate.mcc.network.gresource.xml | 22 |
3 files changed, 35 insertions, 13 deletions
diff --git a/capplets/network/Makefile.am b/capplets/network/Makefile.am index 904d2e28..cb1671eb 100644 --- a/capplets/network/Makefile.am +++ b/capplets/network/Makefile.am @@ -3,24 +3,26 @@ cappletname = network bin_PROGRAMS = mate-network-properties +BUILT_SOURCES = mate-network-properties-resources.h mate-network-properties-resources.c +nodist_mate_network_properties_SOURCES = \ + $(BUILT_SOURCES) mate_network_properties_SOURCES = mate-network-properties.c mate_network_properties_LDADD = $(MATECC_CAPPLETS_LIBS) @INTLTOOL_DESKTOP_RULE@ -uidir = $(pkgdatadir)/ui -dist_ui_DATA = mate-network-properties.ui - desktopdir = $(datadir)/applications desktop_in_files = mate-network-properties.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +mate-network-properties-resources.h mate-network-properties-resources.c: org.mate.mcc.network.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.network.gresource.xml) + $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name network $< + AM_CPPFLAGS = \ $(MATECC_CAPPLETS_CFLAGS) \ - -DMATELOCALEDIR="\"$(datadir)/locale\"" \ - -DMATECC_UI_DIR="\"$(uidir)\"" + -DMATELOCALEDIR="\"$(datadir)/locale\"" -CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) $(desktop_DATA) -EXTRA_DIST = $(desktop_in_files) +CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) $(desktop_DATA) $(BUILT_SOURCES) +EXTRA_DIST = mate-network-properties.ui $(desktop_in_files) org.mate.mcc.network.gresource.xml -include $(top_srcdir)/git.mk diff --git a/capplets/network/mate-network-properties.c b/capplets/network/mate-network-properties.c index 51a149dd..c2243fb3 100644 --- a/capplets/network/mate-network-properties.c +++ b/capplets/network/mate-network-properties.c @@ -80,8 +80,6 @@ enum { #define SOCKS_PROXY_HOST_KEY "host" #define SOCKS_PROXY_PORT_KEY "port" -#define MATECC_GNP_UI_FILE (MATECC_UI_DIR "/mate-network-properties.ui") - static GtkWidget *details_dialog = NULL; static GSList *ignore_hosts = NULL; static GtkTreeModel *model = NULL; @@ -276,8 +274,8 @@ cb_http_details_button_clicked (GtkWidget *button, } builder = gtk_builder_new (); - if (gtk_builder_add_objects_from_file (builder, MATECC_GNP_UI_FILE, - builder_widgets, &error) == 0) { + if (gtk_builder_add_objects_from_resource (builder, "/org/mate/mcc/network/mate-network-properties.ui", + builder_widgets, &error) == 0) { g_warning ("Could not load details dialog: %s", error->message); g_error_free (error); g_object_unref (builder); @@ -468,8 +466,8 @@ main (int argc, char **argv) gtk_init (&argc, &argv); builder = gtk_builder_new (); - if (gtk_builder_add_objects_from_file (builder, MATECC_GNP_UI_FILE, - builder_widgets, &error) == 0) { + if (gtk_builder_add_objects_from_resource (builder, "/org/mate/mcc/network/mate-network-properties.ui", + builder_widgets, &error) == 0) { g_warning ("Could not load main dialog: %s", error->message); g_error_free (error); diff --git a/capplets/network/org.mate.mcc.network.gresource.xml b/capplets/network/org.mate.mcc.network.gresource.xml new file mode 100644 index 00000000..84cefc59 --- /dev/null +++ b/capplets/network/org.mate.mcc.network.gresource.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + This file is part of MATE Control Center. + + MATE Control Center is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + MATE Control Center is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with MATE Control Center. If not, see <http://www.gnu.org/licenses/>. +--> +<gresources> + <gresource prefix="/org/mate/mcc/network"> + <file compressed="true">mate-network-properties.ui</file> + </gresource> +</gresources> |