all: $(TARGET)
-tests: test test1 test2
-
$(TARGET): simple-launcher.o launchable-item.o launcher-item.o settings-page-items.o utils.o settings-dialog.o gconf-wrapper.o dialog-entry.o settings-page-entries.o
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
-test: test.o launcher-item.o
- g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
-
-test1: test1.o settings-page-items.o launcher-item.o
- g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
-
-test2: test2.o gconf-wrapper.o
- g++ -g -o $@ $^ $(GCONFLIBS)
-
clean:
rm -f *.d *.o $(TARGET) test test1 test2
+++ /dev/null
-// This file is a part of Simple Launcher
-//
-// Copyright (C) 2006, 2007, Mikhail Sobolev
-//
-// Simple Launcher is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation.
-//
-// This program 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
-// this program; if not, write to the Free Software Foundation, Inc., 51
-// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-#include <iostream>
-
-#include "launcher-item.h"
-
-char *files[] = {
- "/usr/share/applications/hildon/hildon-control-panel.desktop",
- "/usr/share/applications/hildon/hwr-teacher.desktop",
- "/usr/share/applications/hildon/osso-backup.desktop",
- "/usr/share/applications/hildon/osso-global-search.desktop",
- 0
-};
-
-int main() {
- for (int i = 0 ; files[i] != 0 ; ++i) {
- LauncherItem *item = new LauncherItem();
-
- if (item->load(files[i])) {
- std::cout << "Loaded " << files[i] << std::endl
- << " name: " << item->getName() << std::endl
- << " comment: " << item->getComment() << std::endl
- << " service: " << item->getService() << std::endl;
- } else {
- std::cout << "Failed to load " << files[i] << std::endl;
- }
-
- delete item;
- }
-
- return 0;
-}
-
-// vim:ts=2:sw=2:et
+++ /dev/null
-#include <iostream>
-#include <map>
-
-#include <string.h>
-#include <dirent.h>
-
-#include <gtk/gtkmain.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-
-#include "settings-page-items.h"
-#include "launcher-item.h"
-
-static std::string appdir = "/usr/share/applications";
-
-int main(int argc, char *argv[]) {
- gtk_init(&argc, &argv);
-
- DIR *handle = opendir(appdir.c_str());
-
- if (handle != 0) {
- LauncherItems apps;
-
- struct dirent *entry;
-
- while ((entry = readdir(handle)) != 0) {
- if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
- continue;
- }
-
- LauncherItem *item = new LauncherItem();
-
- if (item->load(appdir + "/" + entry->d_name)) {
- std::cout << "Loaded " << entry->d_name << std::endl;
- } else {
- std::cout << "Failed to load " << entry->d_name << std::endl;
- }
-
- apps.push_back(std::pair<std::string, LauncherItem *>(entry->d_name, item));
- }
-
- if (!apps.empty()) {
- SLAList sla_list(26, apps);
-
- GtkDialog *dialog = GTK_DIALOG(gtk_dialog_new_with_buttons("Launcher settings", 0, (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 0));
-
- gtk_container_add(GTK_CONTAINER(dialog->vbox), sla_list.getWidget());
-
- if (gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) {
- for (LauncherItems::const_iterator it = apps.begin(); it != apps.end(); ++it) {
- std::cout << it->first << (it->second->isEnabled() ? " active" : " passive") << std::endl;
- }
- }
-
- gtk_widget_destroy(GTK_WIDGET(dialog));
- }
- } else {
- std::cerr << "Cannot list applications directory" << std::endl;
- }
-
- return 0;
-}
+++ /dev/null
-#include <iostream>
-
-#include "gconf-wrapper.h"
-
-int main() {
- g_type_init();
-
- GConfKey sla("/apps/simple-launcher");
-
- GConfBooleanOption transparency(sla, "transparency", false);
-
- std::cout << "Value: " << transparency.value() << std::endl;
-
- return 0;
-}
--- /dev/null
+
+tests: test test1 test2
+
+test: test.o launcher-item.o
+ g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
+
+test1: test1.o settings-page-items.o launcher-item.o
+ g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
+
+test2: test2.o gconf-wrapper.o
+ g++ -g -o $@ $^ $(GCONFLIBS)
+
+clean:
+ rm -f *.d *.o test test1 test2
--- /dev/null
+// This file is a part of Simple Launcher
+//
+// Copyright (C) 2006, 2007, Mikhail Sobolev
+//
+// Simple Launcher is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// This program 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
+// this program; if not, write to the Free Software Foundation, Inc., 51
+// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+#include <iostream>
+
+#include "launcher-item.h"
+
+char *files[] = {
+ "/usr/share/applications/hildon/hildon-control-panel.desktop",
+ "/usr/share/applications/hildon/hwr-teacher.desktop",
+ "/usr/share/applications/hildon/osso-backup.desktop",
+ "/usr/share/applications/hildon/osso-global-search.desktop",
+ 0
+};
+
+int main() {
+ for (int i = 0 ; files[i] != 0 ; ++i) {
+ LauncherItem *item = new LauncherItem();
+
+ if (item->load(files[i])) {
+ std::cout << "Loaded " << files[i] << std::endl
+ << " name: " << item->getName() << std::endl
+ << " comment: " << item->getComment() << std::endl
+ << " service: " << item->getService() << std::endl;
+ } else {
+ std::cout << "Failed to load " << files[i] << std::endl;
+ }
+
+ delete item;
+ }
+
+ return 0;
+}
+
+// vim:ts=2:sw=2:et
--- /dev/null
+#include <iostream>
+#include <map>
+
+#include <string.h>
+#include <dirent.h>
+
+#include <gtk/gtkmain.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkstock.h>
+
+#include "settings-page-items.h"
+#include "launcher-item.h"
+
+static std::string appdir = "/usr/share/applications";
+
+int main(int argc, char *argv[]) {
+ gtk_init(&argc, &argv);
+
+ DIR *handle = opendir(appdir.c_str());
+
+ if (handle != 0) {
+ LauncherItems apps;
+
+ struct dirent *entry;
+
+ while ((entry = readdir(handle)) != 0) {
+ if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
+ continue;
+ }
+
+ LauncherItem *item = new LauncherItem();
+
+ if (item->load(appdir + "/" + entry->d_name)) {
+ std::cout << "Loaded " << entry->d_name << std::endl;
+ } else {
+ std::cout << "Failed to load " << entry->d_name << std::endl;
+ }
+
+ apps.push_back(std::pair<std::string, LauncherItem *>(entry->d_name, item));
+ }
+
+ if (!apps.empty()) {
+ SLAList sla_list(26, apps);
+
+ GtkDialog *dialog = GTK_DIALOG(gtk_dialog_new_with_buttons("Launcher settings", 0, (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, 0));
+
+ gtk_container_add(GTK_CONTAINER(dialog->vbox), sla_list.getWidget());
+
+ if (gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) {
+ for (LauncherItems::const_iterator it = apps.begin(); it != apps.end(); ++it) {
+ std::cout << it->first << (it->second->isEnabled() ? " active" : " passive") << std::endl;
+ }
+ }
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ }
+ } else {
+ std::cerr << "Cannot list applications directory" << std::endl;
+ }
+
+ return 0;
+}
--- /dev/null
+#include <iostream>
+
+#include "gconf-wrapper.h"
+
+int main() {
+ g_type_init();
+
+ GConfKey sla("/apps/simple-launcher");
+
+ GConfBooleanOption transparency(sla, "transparency", false);
+
+ std::cout << "Value: " << transparency.value() << std::endl;
+
+ return 0;
+}