1.1 --- a/Makefile.am Thu Feb 11 19:47:47 2010 +0000
1.2 +++ b/Makefile.am Sat Feb 20 12:11:02 2010 +0000
1.3 @@ -1,1 +1,1 @@
1.4 -SUBDIRS=plover setup update
1.5 +SUBDIRS=plover setup update plover-gtk app-manager
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/app-manager/Makefile.am Sat Feb 20 12:11:02 2010 +0000
2.3 @@ -0,0 +1,31 @@
2.4 +AM_CFLAGS=$(GUI_CFLAGS) -g -DPLOVER_DATADIR=\""$(pkgdatadir)"\" -I$(top_srcdir)
2.5 +LDADD=../plover/libplover.la ../plover-gtk/libplover-gtk.la $(GUI_LIBS)
2.6 +
2.7 +bin_PROGRAMS=app-manager
2.8 +app_manager_SOURCES=app-manager.c app-manager.h packagelist.c applications.c \
2.9 + localmedia.c localmedia.h
2.10 +if HAVE_WINDRES
2.11 +app_manager_SOURCES+=resources.rc
2.12 +endif
2.13 +uidir=$(pkgdatadir)
2.14 +ui_DATA=app-manager.ui
2.15 +desktopdir=$(datadir)/applications
2.16 +desktop_DATA=app-manager.desktop
2.17 +scaleabledir=$(datadir)/icons/hicolor/scalable/apps
2.18 +scaleable_DATA=plover-applications.svg
2.19 +
2.20 +.rc.$(OBJEXT):
2.21 + $(WINDRES) $< $@
2.22 +
2.23 +resources.$(OBJEXT): plover-applications.ico
2.24 +
2.25 +plover-applications%.pnm: plover-applications.svg
2.26 + rsvg -w $* -h $* -f png $< temp.png
2.27 + pngtopnm temp.png | pnmquant 256 > $@
2.28 + $(RM) temp.png
2.29 +
2.30 +app-manager.ico: plover-applications16.pnm \
2.31 + plover-applications22.pnm plover-applications32.pnm
2.32 + ppmtowinicon -output=$@ $^
2.33 +
2.34 +EXTRA_DIST=app-manager.desktop app-manager.ui plover-applications.svg
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/app-manager/app-manager.c Sat Feb 20 12:11:02 2010 +0000
3.3 @@ -0,0 +1,192 @@
3.4 +/*
3.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
3.6 + *
3.7 + * This program is free software; you can redistribute it and/or modify
3.8 + * it under the terms of the GNU General Public License as published by
3.9 + * the Free Software Foundation; either version 2 of the License, or
3.10 + * (at your option) any later version.
3.11 + *
3.12 + * This program is distributed in the hope that it will be useful,
3.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3.15 + * GNU General Public License for more details.
3.16 + *
3.17 + * You should have received a copy of the GNU General Public License along
3.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
3.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3.20 + */
3.21 +
3.22 +#include "config.h"
3.23 +#include <stdlib.h>
3.24 +#include <string.h>
3.25 +#include <glib.h>
3.26 +#include <gio/gio.h>
3.27 +#include <gtk/gtk.h>
3.28 +#include <plover-gtk/packageset.h>
3.29 +#include "app-manager.h"
3.30 +#include "localmedia.h"
3.31 +
3.32 +#define LOGO_NAME "plover-applications"
3.33 +
3.34 +GtkBuilder *ui;
3.35 +GtkTreeModel *installed,*applications,*location,*local_media;
3.36 +
3.37 +int main(int argc,char **argv)
3.38 +{
3.39 + GError *err=0;
3.40 + GtkWidget *w;
3.41 + gchar *s,*contents;
3.42 + gsize len;
3.43 + PloverPackageSet *set;
3.44 + GOptionEntry options[]={
3.45 + {NULL}
3.46 + };
3.47 + if (!gtk_init_with_args(&argc,&argv,NULL,options,NULL,&err))
3.48 + {
3.49 + g_printerr("%s",err->message);
3.50 + exit(0);
3.51 + }
3.52 + gtk_window_set_default_icon_name(LOGO_NAME);
3.53 + ui=gtk_builder_new();
3.54 + if (!g_file_get_contents("app-manager.ui",&contents,&len,&err) &&
3.55 + g_error_matches(err,G_FILE_ERROR,G_FILE_ERROR_NOENT))
3.56 + {
3.57 + g_clear_error(&err);
3.58 + s=g_build_filename(PLOVER_DATADIR,"app-manager.ui",NULL);
3.59 + (void)g_file_get_contents(s,&contents,&len,&err);
3.60 + g_free(s);
3.61 + }
3.62 + if (!err)
3.63 + {
3.64 + (void)gtk_builder_add_from_string(ui,contents,len,&err);
3.65 + g_free(contents);
3.66 + }
3.67 + if (err)
3.68 + {
3.69 + g_error("%s",err->message);
3.70 + exit(0);
3.71 + }
3.72 + gtk_builder_connect_signals(ui,NULL);
3.73 + installed=GTK_TREE_MODEL(plover_package_store_new());
3.74 + set=plover_package_set_new_from_installed("",NULL);
3.75 + if (set)
3.76 + plover_package_store_add_set(PLOVER_PACKAGE_STORE(installed),set);
3.77 + applications=plover_applications_model_new(installed);
3.78 + set_package_model(applications);
3.79 + gtk_main();
3.80 + g_object_unref(ui);
3.81 + exit(0);
3.82 +}
3.83 +
3.84 +G_MODULE_EXPORT void
3.85 + on_applications_toggled(GtkToggleToolButton *button,gpointer data)
3.86 +{
3.87 + if (gtk_toggle_tool_button_get_active(button))
3.88 + {
3.89 + if (!applications)
3.90 + applications=plover_applications_model_new(installed);
3.91 + set_package_model(applications);
3.92 + }
3.93 +}
3.94 +
3.95 +G_MODULE_EXPORT void
3.96 + on_all_packages_toggled(GtkToggleToolButton *button,gpointer data)
3.97 +{
3.98 + if (gtk_toggle_tool_button_get_active(button))
3.99 + set_package_model(installed);
3.100 +}
3.101 +
3.102 +G_MODULE_EXPORT void
3.103 + on_local_media_toggled(GtkToggleToolButton *button,gpointer data)
3.104 +{
3.105 + if (gtk_toggle_tool_button_get_active(button))
3.106 + {
3.107 + if (!local_media)
3.108 + local_media=plover_local_media_store_new();
3.109 + set_package_model(local_media);
3.110 + }
3.111 +}
3.112 +
3.113 +G_MODULE_EXPORT void
3.114 + on_location_toggled(GtkToggleToolButton *button,gpointer data)
3.115 +{
3.116 + if (gtk_toggle_tool_button_get_active(button))
3.117 + set_package_model(location);
3.118 +}
3.119 +
3.120 +G_MODULE_EXPORT void on_open_location(GtkWidget *widget)
3.121 +{
3.122 + GtkWidget *w=GTK_WIDGET(gtk_builder_get_object(ui,"MainWindow"));
3.123 + GtkWidget *dialog;
3.124 + gchar *path,*name;
3.125 + PloverPackageSet *set;
3.126 + GSList *sets;
3.127 + GError *err=NULL;
3.128 + dialog=gtk_file_chooser_dialog_new("Open Location",GTK_WINDOW(w),
3.129 + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,GTK_STOCK_CANCEL,
3.130 + GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN,GTK_RESPONSE_ACCEPT,NULL);
3.131 +#if GTK_CHECK_VERSION(2,18,0)
3.132 + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(dialog),FALSE);
3.133 +#endif
3.134 + if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_ACCEPT)
3.135 + {
3.136 + path=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
3.137 + set=plover_package_set_new_from_repository(path,&err);
3.138 + if (set)
3.139 + {
3.140 + if (!location)
3.141 + location=GTK_TREE_MODEL(plover_package_store_new());
3.142 + while((sets=
3.143 + plover_package_store_get_sets(PLOVER_PACKAGE_STORE(location))))
3.144 + plover_package_store_remove_set(PLOVER_PACKAGE_STORE(location),
3.145 + PLOVER_PACKAGE_SET(sets->data));
3.146 + plover_package_store_add_set(PLOVER_PACKAGE_STORE(location),set);
3.147 + g_object_unref(set);
3.148 + w=GTK_WIDGET(gtk_builder_get_object(ui,"LocationButton"));
3.149 + name=g_filename_display_basename(path);
3.150 + gtk_tool_button_set_label(GTK_TOOL_BUTTON(w),name);
3.151 + g_free(name);
3.152 + gtk_widget_show(w);
3.153 + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(w),TRUE);
3.154 + }
3.155 + else
3.156 + {
3.157 + gtk_widget_destroy(dialog);
3.158 + dialog=gtk_message_dialog_new(GTK_WINDOW(w),
3.159 + GTK_DIALOG_DESTROY_WITH_PARENT,GTK_MESSAGE_ERROR,
3.160 + GTK_BUTTONS_CLOSE,"Error loading repository '%s'",path);
3.161 + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
3.162 + "%s",err->message);
3.163 + gtk_dialog_run(GTK_DIALOG(dialog));
3.164 + g_error_free(err);
3.165 + }
3.166 + g_free(path);
3.167 + }
3.168 + gtk_widget_destroy(dialog);
3.169 +}
3.170 +
3.171 +G_MODULE_EXPORT void on_scan_local_media(GtkWidget *widget)
3.172 +{
3.173 + if (!local_media)
3.174 + local_media=plover_local_media_store_new();
3.175 + plover_local_media_store_scan(PLOVER_LOCAL_MEDIA_STORE(local_media));
3.176 +}
3.177 +
3.178 +G_MODULE_EXPORT void on_help_about(GtkWidget *widget)
3.179 +{
3.180 + GtkWidget *w=GTK_WIDGET(gtk_builder_get_object(ui,"MainWindow"));
3.181 + gtk_show_about_dialog(GTK_WINDOW(w),"name",PACKAGE_NAME,
3.182 + "version",PACKAGE_VERSION,"comments","Application Manager",
3.183 + "copyright","Copyright © 2010 J. Ali Harlow","logo-icon-name",LOGO_NAME,
3.184 + NULL);
3.185 +}
3.186 +
3.187 +G_MODULE_EXPORT void on_find_clicked(GtkButton *button)
3.188 +{
3.189 + gchar *text;
3.190 + GtkWidget *w=GTK_WIDGET(gtk_builder_get_object(ui,"SearchEntry"));
3.191 + text=g_strdup(gtk_entry_get_text(GTK_ENTRY(w)));
3.192 + gtk_entry_set_text(GTK_ENTRY(w),"");
3.193 + gtk_entry_set_text(GTK_ENTRY(w),text);
3.194 + g_free(text);
3.195 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/app-manager/app-manager.desktop Sat Feb 20 12:11:02 2010 +0000
4.3 @@ -0,0 +1,9 @@
4.4 +[Desktop Entry]
4.5 +Encoding=UTF-8
4.6 +Name=Application Manager
4.7 +Comment=Manage applications
4.8 +Exec=app-manager
4.9 +Icon=plover-applications
4.10 +Terminal=false
4.11 +Type=Application
4.12 +Categories=GTK
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/app-manager/app-manager.h Sat Feb 20 12:11:02 2010 +0000
5.3 @@ -0,0 +1,7 @@
5.4 +#include <gtk/gtk.h>
5.5 +#include <plover-gtk/package.h>
5.6 +
5.7 +extern GtkBuilder *ui;
5.8 +GtkTreeModel *plover_applications_model_new(GtkTreeModel *installed);
5.9 +void set_package_model(GtkTreeModel *model);
5.10 +PloverPackage *get_active_package(void);
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/app-manager/app-manager.ui Sat Feb 20 12:11:02 2010 +0000
6.3 @@ -0,0 +1,609 @@
6.4 +<?xml version="1.0"?>
6.5 +<interface>
6.6 + <requires lib="gtk+" version="2.16"/>
6.7 + <!-- interface-naming-policy toplevel-contextual -->
6.8 + <object class="GtkWindow" id="MainWindow">
6.9 + <property name="visible">True</property>
6.10 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.11 + <property name="title" translatable="yes">Application Manager</property>
6.12 + <property name="default_width">600</property>
6.13 + <property name="default_height">400</property>
6.14 + <signal name="delete_event" handler="gtk_main_quit"/>
6.15 + <child>
6.16 + <object class="GtkVBox" id="vbox1">
6.17 + <property name="visible">True</property>
6.18 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.19 + <property name="orientation">vertical</property>
6.20 + <property name="spacing">6</property>
6.21 + <child>
6.22 + <object class="GtkMenuBar" id="menubar1">
6.23 + <property name="visible">True</property>
6.24 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.25 + <child>
6.26 + <object class="GtkMenuItem" id="menuitem1">
6.27 + <property name="visible">True</property>
6.28 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.29 + <property name="label" translatable="yes">_Package</property>
6.30 + <property name="use_underline">True</property>
6.31 + <child type="submenu">
6.32 + <object class="GtkMenu" id="menu1">
6.33 + <property name="visible">True</property>
6.34 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.35 + <child>
6.36 + <object class="GtkImageMenuItem" id="imagemenuitem1">
6.37 + <property name="label">Open _Location...</property>
6.38 + <property name="visible">True</property>
6.39 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.40 + <property name="tooltip_text" translatable="yes">Open a package repository at a known location</property>
6.41 + <property name="use_underline">True</property>
6.42 + <property name="image">image1</property>
6.43 + <property name="use_stock">False</property>
6.44 + <accelerator key="l" signal="activate" modifiers="GDK_CONTROL_MASK"/>
6.45 + <signal name="activate" handler="on_open_location"/>
6.46 + </object>
6.47 + </child>
6.48 + <child>
6.49 + <object class="GtkImageMenuItem" id="menuitem5">
6.50 + <property name="label" translatable="yes">_Scan local media</property>
6.51 + <property name="visible">True</property>
6.52 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.53 + <property name="tooltip_text" translatable="yes">Scan local media for package repositories</property>
6.54 + <property name="use_underline">True</property>
6.55 + <property name="image">image2</property>
6.56 + <property name="use_stock">False</property>
6.57 + <signal name="activate" handler="on_scan_local_media"/>
6.58 + </object>
6.59 + </child>
6.60 + <child>
6.61 + <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
6.62 + <property name="visible">True</property>
6.63 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.64 + </object>
6.65 + </child>
6.66 + <child>
6.67 + <object class="GtkImageMenuItem" id="imagemenuitem5">
6.68 + <property name="label">gtk-quit</property>
6.69 + <property name="visible">True</property>
6.70 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.71 + <property name="tooltip_text" translatable="yes">Quit the application manager</property>
6.72 + <property name="use_underline">True</property>
6.73 + <property name="use_stock">True</property>
6.74 + <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
6.75 + <signal name="activate" handler="gtk_main_quit"/>
6.76 + </object>
6.77 + </child>
6.78 + </object>
6.79 + </child>
6.80 + </object>
6.81 + </child>
6.82 + <child>
6.83 + <object class="GtkMenuItem" id="menuitem3">
6.84 + <property name="visible">True</property>
6.85 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.86 + <property name="label" translatable="yes">_View</property>
6.87 + <property name="use_underline">True</property>
6.88 + <child type="submenu">
6.89 + <object class="GtkMenu" id="menu2">
6.90 + <property name="visible">True</property>
6.91 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.92 + <child>
6.93 + <object class="GtkRadioMenuItem" id="menuitem2">
6.94 + <property name="visible">True</property>
6.95 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.96 + <property name="tooltip_text" translatable="yes">Show a list of files owned by the selected package</property>
6.97 + <property name="label" translatable="yes">_File list</property>
6.98 + <property name="use_underline">True</property>
6.99 + <property name="draw_as_radio">True</property>
6.100 + <signal name="toggled" handler="on_view_files_toggled"/>
6.101 + </object>
6.102 + </child>
6.103 + <child>
6.104 + <object class="GtkRadioMenuItem" id="menuitem6">
6.105 + <property name="visible">True</property>
6.106 + <property name="tooltip_text" translatable="yes">Show the description etc., of the selected package</property>
6.107 + <property name="label" translatable="yes">Package _details</property>
6.108 + <property name="use_underline">True</property>
6.109 + <property name="active">True</property>
6.110 + <property name="draw_as_radio">True</property>
6.111 + <property name="group">menuitem2</property>
6.112 + <signal name="toggled" handler="on_view_details_toggled"/>
6.113 + </object>
6.114 + </child>
6.115 + </object>
6.116 + </child>
6.117 + </object>
6.118 + </child>
6.119 + <child>
6.120 + <object class="GtkMenuItem" id="menuitem4">
6.121 + <property name="visible">True</property>
6.122 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.123 + <property name="label" translatable="yes">_Help</property>
6.124 + <property name="use_underline">True</property>
6.125 + <child type="submenu">
6.126 + <object class="GtkMenu" id="menu3">
6.127 + <property name="visible">True</property>
6.128 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.129 + <child>
6.130 + <object class="GtkImageMenuItem" id="imagemenuitem10">
6.131 + <property name="label">gtk-about</property>
6.132 + <property name="visible">True</property>
6.133 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.134 + <property name="tooltip_text" translatable="yes">Display details about the application manager</property>
6.135 + <property name="use_underline">True</property>
6.136 + <property name="use_stock">True</property>
6.137 + <signal name="activate" handler="on_help_about"/>
6.138 + </object>
6.139 + </child>
6.140 + </object>
6.141 + </child>
6.142 + </object>
6.143 + </child>
6.144 + </object>
6.145 + <packing>
6.146 + <property name="expand">False</property>
6.147 + <property name="position">0</property>
6.148 + </packing>
6.149 + </child>
6.150 + <child>
6.151 + <object class="GtkVPaned" id="vpaned2">
6.152 + <property name="visible">True</property>
6.153 + <property name="can_focus">True</property>
6.154 + <property name="orientation">vertical</property>
6.155 + <property name="position">200</property>
6.156 + <property name="position_set">True</property>
6.157 + <child>
6.158 + <object class="GtkAlignment" id="alignment1">
6.159 + <property name="visible">True</property>
6.160 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.161 + <property name="left_padding">6</property>
6.162 + <property name="right_padding">6</property>
6.163 + <child>
6.164 + <object class="GtkHPaned" id="hpaned1">
6.165 + <property name="visible">True</property>
6.166 + <property name="can_focus">True</property>
6.167 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.168 + <property name="position_set">True</property>
6.169 + <child>
6.170 + <object class="GtkVBox" id="vbox2">
6.171 + <property name="visible">True</property>
6.172 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.173 + <property name="orientation">vertical</property>
6.174 + <property name="spacing">6</property>
6.175 + <child>
6.176 + <object class="GtkHBox" id="hbox1">
6.177 + <property name="visible">True</property>
6.178 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.179 + <property name="spacing">6</property>
6.180 + <child>
6.181 + <object class="GtkEntry" id="SearchEntry">
6.182 + <property name="visible">True</property>
6.183 + <property name="can_focus">True</property>
6.184 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.185 + <property name="invisible_char">●</property>
6.186 + <property name="activates_default">True</property>
6.187 + <property name="width_chars">10</property>
6.188 + <property name="caps_lock_warning">False</property>
6.189 + </object>
6.190 + <packing>
6.191 + <property name="position">0</property>
6.192 + </packing>
6.193 + </child>
6.194 + <child>
6.195 + <object class="GtkButton" id="button1">
6.196 + <property name="label">gtk-find</property>
6.197 + <property name="visible">True</property>
6.198 + <property name="can_focus">True</property>
6.199 + <property name="can_default">True</property>
6.200 + <property name="has_default">True</property>
6.201 + <property name="receives_default">True</property>
6.202 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.203 + <property name="use_stock">True</property>
6.204 + <signal name="clicked" handler="on_find_clicked"/>
6.205 + </object>
6.206 + <packing>
6.207 + <property name="expand">False</property>
6.208 + <property name="fill">False</property>
6.209 + <property name="position">1</property>
6.210 + </packing>
6.211 + </child>
6.212 + </object>
6.213 + <packing>
6.214 + <property name="expand">False</property>
6.215 + <property name="fill">False</property>
6.216 + <property name="position">0</property>
6.217 + </packing>
6.218 + </child>
6.219 + <child>
6.220 + <object class="GtkHBox" id="hbox4">
6.221 + <property name="visible">True</property>
6.222 + <child>
6.223 + <object class="GtkVSeparator" id="vseparator1">
6.224 + <property name="visible">True</property>
6.225 + <property name="orientation">vertical</property>
6.226 + </object>
6.227 + <packing>
6.228 + <property name="expand">False</property>
6.229 + <property name="position">0</property>
6.230 + </packing>
6.231 + </child>
6.232 + <child>
6.233 + <object class="GtkToolbar" id="toolbar1">
6.234 + <property name="visible">True</property>
6.235 + <property name="orientation">vertical</property>
6.236 + <property name="icon_size">2</property>
6.237 + <property name="icon_size_set">True</property>
6.238 + <child>
6.239 + <object class="GtkRadioToolButton" id="toolbutton1">
6.240 + <property name="visible">True</property>
6.241 + <property name="tooltip_text" translatable="yes">Show installed applications</property>
6.242 + <property name="label" translatable="yes">_Applications</property>
6.243 + <property name="use_underline">True</property>
6.244 + <property name="icon_name">plover-applications</property>
6.245 + <property name="active">True</property>
6.246 + <signal name="toggled" handler="on_applications_toggled"/>
6.247 + </object>
6.248 + <packing>
6.249 + <property name="expand">False</property>
6.250 + <property name="homogeneous">True</property>
6.251 + </packing>
6.252 + </child>
6.253 + <child>
6.254 + <object class="GtkRadioToolButton" id="toolbutton2">
6.255 + <property name="visible">True</property>
6.256 + <property name="tooltip_text" translatable="yes">Show all installed packages</property>
6.257 + <property name="label" translatable="yes">A_ll Packages</property>
6.258 + <property name="use_underline">True</property>
6.259 + <property name="stock_id">gtk-index</property>
6.260 + <property name="group">toolbutton1</property>
6.261 + <signal name="toggled" handler="on_all_packages_toggled"/>
6.262 + </object>
6.263 + <packing>
6.264 + <property name="expand">False</property>
6.265 + <property name="homogeneous">True</property>
6.266 + </packing>
6.267 + </child>
6.268 + <child>
6.269 + <object class="GtkSeparatorToolItem" id="toolbutton3">
6.270 + <property name="visible">True</property>
6.271 + </object>
6.272 + <packing>
6.273 + <property name="expand">False</property>
6.274 + <property name="homogeneous">True</property>
6.275 + </packing>
6.276 + </child>
6.277 + <child>
6.278 + <object class="GtkRadioToolButton" id="toolbutton5">
6.279 + <property name="visible">True</property>
6.280 + <property name="tooltip_text" translatable="yes">Show packages in repositories on local media</property>
6.281 + <property name="label" translatable="yes">Local _Media</property>
6.282 + <property name="use_underline">True</property>
6.283 + <property name="stock_id">gtk-cdrom</property>
6.284 + <property name="group">toolbutton1</property>
6.285 + <signal name="toggled" handler="on_local_media_toggled"/>
6.286 + </object>
6.287 + <packing>
6.288 + <property name="expand">False</property>
6.289 + <property name="homogeneous">True</property>
6.290 + </packing>
6.291 + </child>
6.292 + <child>
6.293 + <object class="GtkRadioToolButton" id="LocationButton">
6.294 + <property name="label" translatable="yes">Location</property>
6.295 + <property name="use_underline">True</property>
6.296 + <property name="stock_id">gtk-directory</property>
6.297 + <property name="group">toolbutton1</property>
6.298 + <signal name="toggled" handler="on_location_toggled"/>
6.299 + </object>
6.300 + <packing>
6.301 + <property name="expand">False</property>
6.302 + <property name="homogeneous">True</property>
6.303 + </packing>
6.304 + </child>
6.305 + <child>
6.306 + <object class="GtkRadioToolButton" id="toolbutton4">
6.307 + <property name="tooltip_text" translatable="yes">Show updates available for installed packages</property>
6.308 + <property name="label" translatable="yes">_Updates</property>
6.309 + <property name="use_underline">True</property>
6.310 + <property name="stock_id">gtk-execute</property>
6.311 + <property name="group">toolbutton1</property>
6.312 + </object>
6.313 + <packing>
6.314 + <property name="expand">False</property>
6.315 + <property name="homogeneous">True</property>
6.316 + </packing>
6.317 + </child>
6.318 + </object>
6.319 + <packing>
6.320 + <property name="position">1</property>
6.321 + </packing>
6.322 + </child>
6.323 + <child>
6.324 + <object class="GtkVSeparator" id="vseparator2">
6.325 + <property name="visible">True</property>
6.326 + <property name="orientation">vertical</property>
6.327 + </object>
6.328 + <packing>
6.329 + <property name="expand">False</property>
6.330 + <property name="position">2</property>
6.331 + </packing>
6.332 + </child>
6.333 + </object>
6.334 + <packing>
6.335 + <property name="position">1</property>
6.336 + </packing>
6.337 + </child>
6.338 + </object>
6.339 + <packing>
6.340 + <property name="resize">False</property>
6.341 + <property name="shrink">False</property>
6.342 + </packing>
6.343 + </child>
6.344 + <child>
6.345 + <object class="GtkScrolledWindow" id="scrolledwindow2">
6.346 + <property name="visible">True</property>
6.347 + <property name="can_focus">True</property>
6.348 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.349 + <property name="hscrollbar_policy">automatic</property>
6.350 + <property name="vscrollbar_policy">automatic</property>
6.351 + <property name="shadow_type">in</property>
6.352 + <child>
6.353 + <object class="GtkTreeView" id="Packages">
6.354 + <property name="visible">True</property>
6.355 + <property name="can_focus">True</property>
6.356 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.357 + </object>
6.358 + </child>
6.359 + </object>
6.360 + <packing>
6.361 + <property name="resize">True</property>
6.362 + <property name="shrink">True</property>
6.363 + </packing>
6.364 + </child>
6.365 + </object>
6.366 + </child>
6.367 + </object>
6.368 + <packing>
6.369 + <property name="resize">True</property>
6.370 + <property name="shrink">True</property>
6.371 + </packing>
6.372 + </child>
6.373 + <child>
6.374 + <object class="GtkAlignment" id="alignment2">
6.375 + <property name="visible">True</property>
6.376 + <property name="left_padding">6</property>
6.377 + <property name="right_padding">6</property>
6.378 + <child>
6.379 + <object class="GtkHBox" id="ActivePackage">
6.380 + <property name="visible">True</property>
6.381 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.382 + <property name="spacing">6</property>
6.383 + <child>
6.384 + <object class="GtkScrolledWindow" id="FilesScrolledWindow">
6.385 + <property name="visible">True</property>
6.386 + <property name="can_focus">True</property>
6.387 + <property name="hscrollbar_policy">automatic</property>
6.388 + <property name="vscrollbar_policy">automatic</property>
6.389 + <property name="shadow_type">in</property>
6.390 + <child>
6.391 + <object class="GtkTreeView" id="Files">
6.392 + <property name="visible">True</property>
6.393 + <property name="can_focus">True</property>
6.394 + </object>
6.395 + </child>
6.396 + </object>
6.397 + <packing>
6.398 + <property name="position">0</property>
6.399 + </packing>
6.400 + </child>
6.401 + <child>
6.402 + <object class="GtkScrolledWindow" id="DescriptionScrolledWindow">
6.403 + <property name="visible">True</property>
6.404 + <property name="can_focus">True</property>
6.405 + <property name="hscrollbar_policy">automatic</property>
6.406 + <property name="vscrollbar_policy">automatic</property>
6.407 + <property name="shadow_type">in</property>
6.408 + <child>
6.409 + <object class="GtkTextView" id="textview1">
6.410 + <property name="visible">True</property>
6.411 + <property name="can_focus">True</property>
6.412 + <property name="pixels_above_lines">6</property>
6.413 + <property name="pixels_below_lines">6</property>
6.414 + <property name="editable">False</property>
6.415 + <property name="wrap_mode">word</property>
6.416 + <property name="left_margin">6</property>
6.417 + <property name="right_margin">6</property>
6.418 + <property name="buffer">description</property>
6.419 + <property name="accepts_tab">False</property>
6.420 + </object>
6.421 + </child>
6.422 + </object>
6.423 + <packing>
6.424 + <property name="position">1</property>
6.425 + </packing>
6.426 + </child>
6.427 + <child>
6.428 + <object class="GtkVBox" id="PackageDetails">
6.429 + <property name="visible">True</property>
6.430 + <property name="orientation">vertical</property>
6.431 + <child>
6.432 + <object class="GtkAlignment" id="HomepageBox">
6.433 + <property name="visible">True</property>
6.434 + <property name="xscale">0</property>
6.435 + <property name="yscale">0</property>
6.436 + <child>
6.437 + <object class="GtkHBox" id="hbox3">
6.438 + <property name="visible">True</property>
6.439 + <child>
6.440 + <object class="GtkImage" id="HomeImage">
6.441 + <property name="visible">True</property>
6.442 + <property name="stock">gtk-home</property>
6.443 + </object>
6.444 + <packing>
6.445 + <property name="fill">False</property>
6.446 + <property name="position">0</property>
6.447 + </packing>
6.448 + </child>
6.449 + <child>
6.450 + <object class="GtkLinkButton" id="Homepage">
6.451 + <property name="label" translatable="yes">www.gnome.org</property>
6.452 + <property name="visible">True</property>
6.453 + <property name="can_focus">True</property>
6.454 + <property name="receives_default">True</property>
6.455 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.456 + <property name="relief">none</property>
6.457 + <property name="uri">http://www.city-occupational.co.uk/</property>
6.458 + </object>
6.459 + <packing>
6.460 + <property name="fill">False</property>
6.461 + <property name="position">1</property>
6.462 + </packing>
6.463 + </child>
6.464 + </object>
6.465 + </child>
6.466 + </object>
6.467 + <packing>
6.468 + <property name="expand">False</property>
6.469 + <property name="position">0</property>
6.470 + </packing>
6.471 + </child>
6.472 + <child>
6.473 + <object class="GtkScrolledWindow" id="DetailsScrolledWindow">
6.474 + <property name="visible">True</property>
6.475 + <property name="can_focus">True</property>
6.476 + <property name="hscrollbar_policy">never</property>
6.477 + <property name="vscrollbar_policy">automatic</property>
6.478 + <child>
6.479 + <object class="GtkViewport" id="DetailsViewport">
6.480 + <property name="visible">True</property>
6.481 + <property name="resize_mode">queue</property>
6.482 + <child>
6.483 + <object class="GtkAlignment" id="DetailsAlignment">
6.484 + <property name="visible">True</property>
6.485 + <property name="yalign">0</property>
6.486 + <property name="yscale">0</property>
6.487 + <child>
6.488 + <object class="GtkTable" id="Details">
6.489 + <property name="visible">True</property>
6.490 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.491 + <property name="border_width">6</property>
6.492 + <property name="n_rows">2</property>
6.493 + <property name="n_columns">2</property>
6.494 + <property name="column_spacing">6</property>
6.495 + <property name="row_spacing">6</property>
6.496 + <child>
6.497 + <object class="GtkLabel" id="label6">
6.498 + <property name="visible">True</property>
6.499 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.500 + <property name="xalign">0</property>
6.501 + <property name="label" translatable="yes">Architecture:</property>
6.502 + <property name="single_line_mode">True</property>
6.503 + </object>
6.504 + <packing>
6.505 + <property name="x_options">GTK_FILL</property>
6.506 + <property name="y_options"></property>
6.507 + </packing>
6.508 + </child>
6.509 + <child>
6.510 + <object class="GtkLabel" id="Architecture">
6.511 + <property name="visible">True</property>
6.512 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.513 + <property name="xalign">0</property>
6.514 + <property name="label" translatable="yes">i386</property>
6.515 + <property name="selectable">True</property>
6.516 + <property name="single_line_mode">True</property>
6.517 + </object>
6.518 + <packing>
6.519 + <property name="left_attach">1</property>
6.520 + <property name="right_attach">2</property>
6.521 + <property name="x_options">GTK_FILL</property>
6.522 + <property name="y_options"></property>
6.523 + </packing>
6.524 + </child>
6.525 + <child>
6.526 + <object class="GtkLabel" id="label4">
6.527 + <property name="visible">True</property>
6.528 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.529 + <property name="xalign">0</property>
6.530 + <property name="label" translatable="yes">License:</property>
6.531 + <property name="single_line_mode">True</property>
6.532 + </object>
6.533 + <packing>
6.534 + <property name="top_attach">1</property>
6.535 + <property name="bottom_attach">2</property>
6.536 + <property name="x_options">GTK_FILL</property>
6.537 + <property name="y_options"></property>
6.538 + </packing>
6.539 + </child>
6.540 + <child>
6.541 + <object class="GtkLabel" id="License">
6.542 + <property name="visible">True</property>
6.543 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.544 + <property name="xalign">0</property>
6.545 + <property name="label" translatable="yes">LGPL</property>
6.546 + <property name="selectable">True</property>
6.547 + <property name="single_line_mode">True</property>
6.548 + </object>
6.549 + <packing>
6.550 + <property name="left_attach">1</property>
6.551 + <property name="right_attach">2</property>
6.552 + <property name="top_attach">1</property>
6.553 + <property name="bottom_attach">2</property>
6.554 + <property name="x_options">GTK_FILL</property>
6.555 + <property name="y_options"></property>
6.556 + </packing>
6.557 + </child>
6.558 + </object>
6.559 + </child>
6.560 + </object>
6.561 + </child>
6.562 + </object>
6.563 + </child>
6.564 + </object>
6.565 + <packing>
6.566 + <property name="position">1</property>
6.567 + </packing>
6.568 + </child>
6.569 + </object>
6.570 + <packing>
6.571 + <property name="expand">False</property>
6.572 + <property name="pack_type">end</property>
6.573 + <property name="position">2</property>
6.574 + </packing>
6.575 + </child>
6.576 + </object>
6.577 + </child>
6.578 + </object>
6.579 + <packing>
6.580 + <property name="resize">False</property>
6.581 + <property name="shrink">True</property>
6.582 + </packing>
6.583 + </child>
6.584 + </object>
6.585 + <packing>
6.586 + <property name="position">1</property>
6.587 + </packing>
6.588 + </child>
6.589 + <child>
6.590 + <object class="GtkStatusbar" id="statusbar1">
6.591 + <property name="visible">True</property>
6.592 + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
6.593 + <property name="spacing">2</property>
6.594 + </object>
6.595 + <packing>
6.596 + <property name="expand">False</property>
6.597 + <property name="position">2</property>
6.598 + </packing>
6.599 + </child>
6.600 + </object>
6.601 + </child>
6.602 + </object>
6.603 + <object class="GtkTextBuffer" id="description"/>
6.604 + <object class="GtkImage" id="image1">
6.605 + <property name="visible">True</property>
6.606 + <property name="stock">gtk-open</property>
6.607 + </object>
6.608 + <object class="GtkImage" id="image2">
6.609 + <property name="visible">True</property>
6.610 + <property name="stock">gtk-cdrom</property>
6.611 + </object>
6.612 +</interface>
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/app-manager/applications.c Sat Feb 20 12:11:02 2010 +0000
7.3 @@ -0,0 +1,68 @@
7.4 +/*
7.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
7.6 + *
7.7 + * This program is free software; you can redistribute it and/or modify
7.8 + * it under the terms of the GNU General Public License as published by
7.9 + * the Free Software Foundation; either version 2 of the License, or
7.10 + * (at your option) any later version.
7.11 + *
7.12 + * This program is distributed in the hope that it will be useful,
7.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.15 + * GNU General Public License for more details.
7.16 + *
7.17 + * You should have received a copy of the GNU General Public License along
7.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
7.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
7.20 + */
7.21 +
7.22 +#include "config.h"
7.23 +#include <stdlib.h>
7.24 +#include <string.h>
7.25 +#include <glib.h>
7.26 +#include <gtk/gtk.h>
7.27 +#include <plover-gtk/packagestore.h>
7.28 +#include "app-manager.h"
7.29 +
7.30 +static gboolean plover_applications_visible_func(GtkTreeModel *model,
7.31 + GtkTreeIter *iter,gpointer data)
7.32 +{
7.33 + /* Visible if row is non-empty and package contains a .desktop file
7.34 + * in /usr/share/applications
7.35 + */
7.36 + PloverPackage *package;
7.37 + GtkTreeModel *file_store;
7.38 + GtkTreeIter fi;
7.39 + gchar *name,*dir;
7.40 + gboolean visible=FALSE;
7.41 + gtk_tree_model_get(model,iter,PLOVER_PACKAGE_STORE_OBJ_COLUMN,&package,-1);
7.42 + if (package)
7.43 + {
7.44 + file_store=GTK_TREE_MODEL(plover_package_get_file_store(package));
7.45 + if (gtk_tree_model_get_iter_first(file_store,&fi))
7.46 + {
7.47 + do
7.48 + {
7.49 + gtk_tree_model_get(file_store,&fi,
7.50 + PLOVER_PACKAGE_FILE_STORE_NAME_COLUMN,&name,-1);
7.51 + dir=g_path_get_dirname(name);
7.52 + if (!strcmp(dir,"/usr/share/applications") &&
7.53 + g_str_has_suffix(name,".desktop"))
7.54 + visible=TRUE;
7.55 + g_free(dir);
7.56 + g_free(name);
7.57 + } while(!visible && gtk_tree_model_iter_next(file_store,&fi));
7.58 + }
7.59 + }
7.60 + g_object_unref(package);
7.61 + return visible;
7.62 +}
7.63 +
7.64 +GtkTreeModel *plover_applications_model_new(GtkTreeModel *installed)
7.65 +{
7.66 + GtkTreeModel *model;
7.67 + model=gtk_tree_model_filter_new(installed,NULL);
7.68 + gtk_tree_model_filter_set_visible_func(model,
7.69 + plover_applications_visible_func,NULL,NULL);
7.70 + return model;
7.71 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/app-manager/localmedia.c Sat Feb 20 12:11:02 2010 +0000
8.3 @@ -0,0 +1,193 @@
8.4 +/*
8.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
8.6 + *
8.7 + * This program is free software; you can redistribute it and/or modify
8.8 + * it under the terms of the GNU General Public License as published by
8.9 + * the Free Software Foundation; either version 2 of the License, or
8.10 + * (at your option) any later version.
8.11 + *
8.12 + * This program is distributed in the hope that it will be useful,
8.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8.15 + * GNU General Public License for more details.
8.16 + *
8.17 + * You should have received a copy of the GNU General Public License along
8.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
8.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
8.20 + */
8.21 +
8.22 +#include "config.h"
8.23 +#include <stdlib.h>
8.24 +#include <string.h>
8.25 +#include <glib.h>
8.26 +#include <gio/gio.h>
8.27 +#include <gtk/gtk.h>
8.28 +#include <plover-gtk/packagestore.h>
8.29 +#include "localmedia.h"
8.30 +
8.31 +G_DEFINE_TYPE(PloverLocalMediaStore,plover_local_media_store,
8.32 + PLOVER_TYPE_PACKAGE_STORE);
8.33 +
8.34 +static void plover_local_media_store_dispose(GObject *obj)
8.35 +{
8.36 + PloverLocalMediaStore *store=PLOVER_LOCAL_MEDIA_STORE(obj);
8.37 + if (store->monitor)
8.38 + {
8.39 + g_object_unref(store->monitor);
8.40 + store->monitor=NULL;
8.41 + }
8.42 + if (G_OBJECT_CLASS(plover_local_media_store_parent_class)->dispose)
8.43 + G_OBJECT_CLASS(plover_local_media_store_parent_class)->dispose(obj);
8.44 +}
8.45 +
8.46 +static void
8.47 + plover_local_media_store_class_init(PloverLocalMediaStoreClass *klass)
8.48 +{
8.49 + GObjectClass *oclass=G_OBJECT_CLASS(klass);
8.50 + oclass->dispose=plover_local_media_store_dispose;
8.51 +}
8.52 +
8.53 +GtkTreeModel *plover_local_media_store_new(void)
8.54 +{
8.55 + return g_object_new(PLOVER_TYPE_LOCAL_MEDIA_STORE,NULL);
8.56 +}
8.57 +
8.58 +static void local_media_scan_mount(PloverLocalMediaStore *store,GMount *mount)
8.59 +{
8.60 + GFile *root;
8.61 + gchar *path;
8.62 + PloverPackageSet *set;
8.63 + root=g_mount_get_root(mount);
8.64 + path=g_file_get_path(root);
8.65 + if (path)
8.66 + {
8.67 + set=plover_package_set_new_from_repository(path,NULL);
8.68 + if (set)
8.69 + {
8.70 + g_object_set_data(G_OBJECT(mount),"plover-local-media-set",set);
8.71 + plover_package_store_add_set(PLOVER_PACKAGE_STORE(store),set);
8.72 + g_object_ref(mount);
8.73 + }
8.74 + g_free(path);
8.75 + }
8.76 + g_object_unref(root);
8.77 +}
8.78 +
8.79 +static void local_media_mounted(GObject *source,GAsyncResult *res,gpointer data)
8.80 +{
8.81 + GVolume *volume=G_VOLUME(source);
8.82 + GMount *mount;
8.83 + PloverLocalMediaStore *store=PLOVER_LOCAL_MEDIA_STORE(data);
8.84 + if (g_volume_mount_finish(volume,res,NULL))
8.85 + {
8.86 + mount=g_volume_get_mount(volume);
8.87 + if (mount)
8.88 + {
8.89 + local_media_scan_mount(store,mount);
8.90 + g_object_unref(mount);
8.91 + }
8.92 + }
8.93 + g_object_unref(volume);
8.94 +}
8.95 +
8.96 +static void local_media_scan_drive(PloverLocalMediaStore *store,GDrive *drive)
8.97 +{
8.98 + GVolume *volume;
8.99 + GMount *mount;
8.100 + GList *volumes,*link;
8.101 + if (g_drive_has_media(drive))
8.102 + {
8.103 + volumes=g_drive_get_volumes(drive);
8.104 + for(link=volumes;link;link=link->next)
8.105 + {
8.106 + volume=G_VOLUME(link->data);
8.107 + mount=g_volume_get_mount(volume);
8.108 + if (mount)
8.109 + {
8.110 + local_media_scan_mount(store,mount);
8.111 + g_object_unref(mount);
8.112 + }
8.113 + else if (!store->implicit_scan && g_volume_can_mount(volume))
8.114 + g_volume_mount(volume,G_MOUNT_MOUNT_NONE,NULL,NULL,
8.115 + local_media_mounted,store);
8.116 + g_object_unref(volume);
8.117 + }
8.118 + g_list_free(volumes);
8.119 + }
8.120 +}
8.121 +
8.122 +static void local_media_polled(GObject *source,GAsyncResult *res,gpointer data)
8.123 +{
8.124 + GDrive *drive=G_DRIVE(source);
8.125 + PloverLocalMediaStore *store=PLOVER_LOCAL_MEDIA_STORE(data);
8.126 + if (g_drive_poll_for_media_finish(drive,res,NULL))
8.127 + local_media_scan_drive(store,drive);
8.128 + g_object_unref(drive);
8.129 +}
8.130 +
8.131 +void plover_local_media_store_scan(PloverLocalMediaStore *store)
8.132 +{
8.133 + GList *drives,*link;
8.134 + GDrive *drive;
8.135 + g_return_if_fail(PLOVER_IS_LOCAL_MEDIA_STORE(store));
8.136 + drives=g_volume_monitor_get_connected_drives(store->monitor);
8.137 + for(link=drives;link;link=link->next)
8.138 + {
8.139 + drive=G_DRIVE(link->data);
8.140 + if (g_drive_is_media_removable(drive))
8.141 + {
8.142 + if (!g_drive_is_media_check_automatic(drive) &&
8.143 + g_drive_can_poll_for_media(drive) ||
8.144 + !g_drive_has_media(drive) && !store->implicit_scan)
8.145 + {
8.146 + g_object_ref(drive);
8.147 + g_drive_poll_for_media(drive,NULL,local_media_polled,store);
8.148 + }
8.149 + else
8.150 + local_media_scan_drive(store,drive);
8.151 + }
8.152 + g_object_unref(drive);
8.153 + }
8.154 + g_list_free(drives);
8.155 +}
8.156 +
8.157 +static void local_media_mount_added(GVolumeMonitor *volume_monitor,
8.158 + GMount *mount,PloverLocalMediaStore *store)
8.159 +{
8.160 + local_media_scan_mount(store,mount);
8.161 +}
8.162 +
8.163 +static void local_media_mount_removed(GVolumeMonitor *volume_monitor,
8.164 + GMount *mount,PloverLocalMediaStore *store)
8.165 +{
8.166 + PloverPackageSet *set=
8.167 + g_object_get_data(G_OBJECT(mount),"plover-local-media-set");
8.168 + if (set)
8.169 + {
8.170 + plover_package_store_remove_set(PLOVER_PACKAGE_STORE(store),set);
8.171 + g_object_set_data(G_OBJECT(mount),"plover-local-media-set",NULL);
8.172 + g_object_unref(set);
8.173 + g_object_unref(mount);
8.174 + }
8.175 +}
8.176 +
8.177 +static void local_media_mount_changed(GVolumeMonitor *volume_monitor,
8.178 + GMount *mount,PloverLocalMediaStore *store)
8.179 +{
8.180 + local_media_mount_removed(volume_monitor,mount,store);
8.181 + local_media_mount_added(volume_monitor,mount,store);
8.182 +}
8.183 +
8.184 +static void plover_local_media_store_init(PloverLocalMediaStore *store)
8.185 +{
8.186 + store->monitor=g_volume_monitor_get();
8.187 + store->implicit_scan=TRUE;
8.188 + plover_local_media_store_scan(store);
8.189 + store->implicit_scan=FALSE;
8.190 + g_signal_connect(store->monitor,"mount-added",
8.191 + G_CALLBACK(local_media_mount_added),store);
8.192 + g_signal_connect(store->monitor,"mount-changed",
8.193 + G_CALLBACK(local_media_mount_changed),store);
8.194 + g_signal_connect(store->monitor,"mount-removed",
8.195 + G_CALLBACK(local_media_mount_removed),store);
8.196 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/app-manager/localmedia.h Sat Feb 20 12:11:02 2010 +0000
9.3 @@ -0,0 +1,41 @@
9.4 +#include <glib-object.h>
9.5 +#include <plover-gtk/packagestore.h>
9.6 +
9.7 +G_BEGIN_DECLS
9.8 +
9.9 +#define PLOVER_TYPE_LOCAL_MEDIA_STORE\
9.10 + plover_local_media_store_get_type()
9.11 +#define PLOVER_LOCAL_MEDIA_STORE(obj)\
9.12 + G_TYPE_CHECK_INSTANCE_CAST(obj,\
9.13 + PLOVER_TYPE_LOCAL_MEDIA_STORE,\
9.14 + PloverLocalMediaStore)
9.15 +#define PLOVER_LOCAL_MEDIA_STORE_CLASS(klass)\
9.16 + G_TYPE_CHECK_CLASS_CAST(klass,\
9.17 + PLOVER_TYPE_LOCAL_MEDIA_STORE,\
9.18 + PloverLocalMediaStoreClass)
9.19 +#define PLOVER_IS_LOCAL_MEDIA_STORE(obj)\
9.20 + G_TYPE_CHECK_INSTANCE_TYPE(obj,\
9.21 + PLOVER_TYPE_LOCAL_MEDIA_STORE)
9.22 +#define PLOVER_IS_LOCAL_MEDIA_STORE_CLASS(klass)\
9.23 + G_TYPE_CHECK_CLASS_TYPE(obj,\
9.24 + PLOVER_TYPE_LOCAL_MEDIA_STORE)
9.25 +#define PLOVER_LOCAL_MEDIA_STORE_GET_CLASS(obj)\
9.26 + G_TYPE_INSTANCE_GET_CLASS(obj,\
9.27 + PLOVER_TYPE_LOCAL_MEDIA_STORE,\
9.28 + PloverLocalMediaStoreClass)
9.29 +
9.30 +typedef struct _PloverLocalMediaStore {
9.31 + PloverPackageStore parent_instance;
9.32 + GVolumeMonitor *monitor;
9.33 + gboolean implicit_scan;
9.34 +} PloverLocalMediaStore;
9.35 +
9.36 +typedef struct _PloverLocalMediaStoreClass {
9.37 + PloverPackageStoreClass parent_class;
9.38 +} PloverLocalMediaStoreClass;
9.39 +
9.40 +GType plover_local_media_store_get_type(void) G_GNUC_CONST;
9.41 +GtkTreeModel *plover_local_media_store_new(void);
9.42 +void plover_local_media_scan(PloverLocalMediaStore *store);
9.43 +
9.44 +G_END_DECLS
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/app-manager/packagelist.c Sat Feb 20 12:11:02 2010 +0000
10.3 @@ -0,0 +1,240 @@
10.4 +/*
10.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
10.6 + *
10.7 + * This program is free software; you can redistribute it and/or modify
10.8 + * it under the terms of the GNU General Public License as published by
10.9 + * the Free Software Foundation; either version 2 of the License, or
10.10 + * (at your option) any later version.
10.11 + *
10.12 + * This program is distributed in the hope that it will be useful,
10.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10.15 + * GNU General Public License for more details.
10.16 + *
10.17 + * You should have received a copy of the GNU General Public License along
10.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
10.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10.20 + */
10.21 +
10.22 +#include "config.h"
10.23 +#include <stdlib.h>
10.24 +#include <string.h>
10.25 +#include <gtk/gtk.h>
10.26 +#include <plover-gtk/package.h>
10.27 +#include <plover-gtk/packageset.h>
10.28 +#include <plover-gtk/packagestore.h>
10.29 +#include <plover-gtk/packagefilestore.h>
10.30 +#include "app-manager.h"
10.31 +
10.32 +GtkTreeView *view=NULL;
10.33 +PloverPackage *active=NULL;
10.34 +gboolean view_files=FALSE;
10.35 +
10.36 +void package_present(PloverPackage *package)
10.37 +{
10.38 + gchar *s;
10.39 + const char *text,*t;
10.40 + GtkWidget *w;
10.41 + GtkTextBuffer *buf;
10.42 + buf=GTK_TEXT_BUFFER(gtk_builder_get_object(ui,"description"));
10.43 + if (package)
10.44 + {
10.45 + s=g_strdup(plover_package_get_description(package));
10.46 + g_strdelimit(s,"\t\n",' ');
10.47 + }
10.48 + else
10.49 + s=g_strdup("");
10.50 + gtk_text_buffer_set_text(buf,s,-1);
10.51 + g_free(s);
10.52 + w=GTK_WIDGET(gtk_builder_get_object(ui,"PackageDetails"));
10.53 + if (!package)
10.54 + {
10.55 + gtk_widget_hide(w);
10.56 + w=GTK_WIDGET(gtk_builder_get_object(ui,"FilesScrolledWindow"));
10.57 + gtk_widget_hide(w);
10.58 + w=GTK_WIDGET(gtk_builder_get_object(ui,"DescriptionScrolledWindow"));
10.59 + gtk_widget_show(w);
10.60 + }
10.61 + else
10.62 + {
10.63 + if (view_files)
10.64 + gtk_widget_hide(w);
10.65 + else
10.66 + {
10.67 + gtk_widget_show(w);
10.68 + w=GTK_WIDGET(gtk_builder_get_object(ui,"HomepageBox"));
10.69 + text=plover_package_get_URL(package);
10.70 + if (!*text)
10.71 + gtk_widget_hide(w);
10.72 + else
10.73 + {
10.74 + gtk_widget_show(w);
10.75 + w=GTK_WIDGET(gtk_builder_get_object(ui,"Homepage"));
10.76 + gtk_link_button_set_uri(GTK_LINK_BUTTON(w),text);
10.77 + t=strstr(text,"://");
10.78 + if (t)
10.79 + t+=3;
10.80 + if (t)
10.81 + s=strndup(t,strcspn(t,"/"));
10.82 + else
10.83 + s=strdup(text);
10.84 + gtk_button_set_label(GTK_BUTTON(w),s);
10.85 + g_free(s);
10.86 + }
10.87 + w=GTK_WIDGET(gtk_builder_get_object(ui,"Architecture"));
10.88 + gtk_label_set_text(GTK_LABEL(w),plover_package_get_arch(package));
10.89 + w=GTK_WIDGET(gtk_builder_get_object(ui,"License"));
10.90 + gtk_label_set_text(GTK_LABEL(w),
10.91 + plover_package_get_license(package));
10.92 + }
10.93 + w=GTK_WIDGET(gtk_builder_get_object(ui,"FilesScrolledWindow"));
10.94 + if (view_files)
10.95 + gtk_widget_show(w);
10.96 + else
10.97 + gtk_widget_hide(w);
10.98 + w=GTK_WIDGET(gtk_builder_get_object(ui,"DescriptionScrolledWindow"));
10.99 + if (view_files)
10.100 + {
10.101 + gtk_widget_hide(w);
10.102 + w=GTK_WIDGET(gtk_builder_get_object(ui,"Files"));
10.103 + gtk_tree_view_set_model(GTK_TREE_VIEW(w),
10.104 + GTK_TREE_MODEL(plover_package_get_file_store(package)));
10.105 + }
10.106 + else
10.107 + {
10.108 + gtk_widget_show(w);
10.109 + /* Without this, Gtk+ 2.18.6 just truncates long license tags */
10.110 + w=GTK_WIDGET(gtk_builder_get_object(ui,"DetailsScrolledWindow"));
10.111 + gtk_widget_queue_resize(w);
10.112 + }
10.113 + }
10.114 +}
10.115 +
10.116 +void package_filelist_present(PloverPackage *package)
10.117 +{
10.118 +}
10.119 +
10.120 +static void package_selection_changed(GtkTreeSelection *selection)
10.121 +{
10.122 + GtkTreeIter iter;
10.123 + GtkTreeView *view;
10.124 + GtkTreeModel *model;
10.125 + if (active)
10.126 + g_object_unref(active);
10.127 + if (gtk_tree_selection_get_selected(selection,NULL,&iter))
10.128 + {
10.129 + view=gtk_tree_selection_get_tree_view(selection);
10.130 + model=gtk_tree_view_get_model(view);
10.131 + gtk_tree_model_get(model,&iter,PLOVER_PACKAGE_STORE_OBJ_COLUMN,&active,
10.132 + -1);
10.133 + }
10.134 + else
10.135 + active=NULL;
10.136 + package_present(active);
10.137 +}
10.138 +
10.139 +static void package_activated(GtkTreeView *view,GtkTreePath *path,
10.140 + GtkTreeViewColumn *column,gpointer data)
10.141 +{
10.142 + GtkTreeIter iter;
10.143 + GtkTreeModel *model=gtk_tree_view_get_model(view);
10.144 + PloverPackage *package;
10.145 + if (gtk_tree_model_get_iter(model,&iter,path))
10.146 + {
10.147 + gtk_tree_model_get(model,&iter,PLOVER_PACKAGE_STORE_OBJ_COLUMN,&package,
10.148 + -1);
10.149 + package_filelist_present(package);
10.150 + }
10.151 +}
10.152 +
10.153 +static void package_cell_data_func(GtkTreeViewColumn *column,
10.154 + GtkCellRenderer *cell,GtkTreeModel *model,GtkTreeIter *iter,gpointer data)
10.155 +{
10.156 + gchar *markup;
10.157 + gchar *summary,*name,*version;
10.158 + gtk_tree_model_get(model,iter,PLOVER_PACKAGE_STORE_SUMMARY_COLUMN,&summary,
10.159 + PLOVER_PACKAGE_STORE_NAME_COLUMN,&name,
10.160 + PLOVER_PACKAGE_STORE_VERSION_COLUMN,&version,-1);
10.161 + markup=g_strdup_printf("<b>%s</b>\n%s %s",summary,name,version,NULL);
10.162 + g_free(summary);
10.163 + g_free(name);
10.164 + g_free(version);
10.165 + g_object_set(cell,"markup",markup,NULL);
10.166 + g_free(markup);
10.167 +}
10.168 +
10.169 +void set_package_model(GtkTreeModel *model)
10.170 +{
10.171 + GtkWidget *w;
10.172 + GtkTreeViewColumn *column;
10.173 + GtkCellRenderer *renderer;
10.174 + GtkTreeSelection *selection;
10.175 + if (!view)
10.176 + {
10.177 + w=GTK_WIDGET(gtk_builder_get_object(ui,"Packages"));
10.178 + if (w)
10.179 + {
10.180 + view=GTK_TREE_VIEW(w);
10.181 +#if 0
10.182 + column=gtk_tree_view_column_new_with_attributes("Icon",
10.183 + gtk_cell_renderer_pixbuf_new(),"pixbuf",
10.184 + PLOVER_PACKAGE_FILE_STORE_ICON_COLUMN,NULL);
10.185 + gtk_tree_view_append_column(GTK_TREE_VIEW(w),column);
10.186 +#endif
10.187 + column=gtk_tree_view_column_new();
10.188 + gtk_tree_view_column_set_title(column,"Summary");
10.189 + renderer=gtk_cell_renderer_text_new();
10.190 + gtk_tree_view_column_pack_start(column,renderer,FALSE);
10.191 + gtk_tree_view_column_set_cell_data_func(column,renderer,
10.192 + package_cell_data_func,NULL,NULL);
10.193 + gtk_tree_view_append_column(view,column);
10.194 + gtk_widget_show_all(w);
10.195 + gtk_tree_view_set_headers_visible(view,FALSE);
10.196 + w=GTK_WIDGET(gtk_builder_get_object(ui,"SearchEntry"));
10.197 + gtk_tree_view_set_search_entry(view,GTK_ENTRY(w));
10.198 + selection=gtk_tree_view_get_selection(view);
10.199 + g_signal_connect(selection,"changed",
10.200 + G_CALLBACK(package_selection_changed),NULL);
10.201 + g_signal_connect(view,"row-activated",G_CALLBACK(package_activated),
10.202 + NULL);
10.203 + }
10.204 + else
10.205 + g_warning("Packages: no such widget in UI");
10.206 + w=GTK_WIDGET(gtk_builder_get_object(ui,"Files"));
10.207 + if (w)
10.208 + {
10.209 + column=gtk_tree_view_column_new_with_attributes("Name",
10.210 + gtk_cell_renderer_text_new(),"text",
10.211 + PLOVER_PACKAGE_FILE_STORE_NAME_COLUMN,NULL);
10.212 + gtk_tree_view_append_column(GTK_TREE_VIEW(w),column);
10.213 + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(w),FALSE);
10.214 + gtk_widget_show_all(w);
10.215 + }
10.216 + else
10.217 + g_warning("Files: no such widget in UI");
10.218 + }
10.219 + if (view)
10.220 + {
10.221 + gtk_tree_view_set_model(view,model);
10.222 + gtk_tree_view_set_search_column(view,
10.223 + PLOVER_PACKAGE_STORE_NAME_COLUMN);
10.224 + }
10.225 + package_present(NULL);
10.226 +}
10.227 +
10.228 +PloverPackage *get_active_package(void)
10.229 +{
10.230 + return active;
10.231 +}
10.232 +
10.233 +G_MODULE_EXPORT void
10.234 + on_view_files_toggled(GtkCheckMenuItem *menuitem,gpointer data)
10.235 +{
10.236 + view_files=gtk_check_menu_item_get_active(menuitem);
10.237 + package_present(active);
10.238 +}
10.239 +
10.240 +G_MODULE_EXPORT void
10.241 + on_view_details_toggled(GtkCheckMenuItem *menuitem,gpointer data)
10.242 +{
10.243 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/app-manager/plover-applications.svg Sat Feb 20 12:11:02 2010 +0000
11.3 @@ -0,0 +1,1108 @@
11.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
11.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
11.6 +<svg
11.7 + xmlns:dc="http://purl.org/dc/elements/1.1/"
11.8 + xmlns:cc="http://web.resource.org/cc/"
11.9 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
11.10 + xmlns:svg="http://www.w3.org/2000/svg"
11.11 + xmlns="http://www.w3.org/2000/svg"
11.12 + xmlns:xlink="http://www.w3.org/1999/xlink"
11.13 + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11.14 + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11.15 + sodipodi:docname="applications-other.svg"
11.16 + sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/categories"
11.17 + inkscape:version="0.45"
11.18 + sodipodi:version="0.32"
11.19 + id="svg2963"
11.20 + height="48px"
11.21 + width="48px"
11.22 + inkscape:output_extension="org.inkscape.output.svg.inkscape">
11.23 + <defs
11.24 + id="defs3">
11.25 + <linearGradient
11.26 + id="linearGradient2394">
11.27 + <stop
11.28 + id="stop2396"
11.29 + offset="0"
11.30 + style="stop-color:#5c3566;stop-opacity:1" />
11.31 + <stop
11.32 + id="stop2398"
11.33 + offset="1"
11.34 + style="stop-color:#45284d;stop-opacity:1;" />
11.35 + </linearGradient>
11.36 + <linearGradient
11.37 + id="linearGradient2384">
11.38 + <stop
11.39 + style="stop-color:#5c3566;stop-opacity:1;"
11.40 + offset="0"
11.41 + id="stop2386" />
11.42 + <stop
11.43 + style="stop-color:#43274b;stop-opacity:1;"
11.44 + offset="1"
11.45 + id="stop2388" />
11.46 + </linearGradient>
11.47 + <linearGradient
11.48 + inkscape:collect="always"
11.49 + id="linearGradient3938">
11.50 + <stop
11.51 + style="stop-color:#ffffff;stop-opacity:1;"
11.52 + offset="0"
11.53 + id="stop3940" />
11.54 + <stop
11.55 + style="stop-color:#ffffff;stop-opacity:0;"
11.56 + offset="1"
11.57 + id="stop3942" />
11.58 + </linearGradient>
11.59 + <linearGradient
11.60 + inkscape:collect="always"
11.61 + id="linearGradient3919">
11.62 + <stop
11.63 + style="stop-color:#ffffff;stop-opacity:1;"
11.64 + offset="0"
11.65 + id="stop3921" />
11.66 + <stop
11.67 + style="stop-color:#ffffff;stop-opacity:0;"
11.68 + offset="1"
11.69 + id="stop3923" />
11.70 + </linearGradient>
11.71 + <linearGradient
11.72 + inkscape:collect="always"
11.73 + id="linearGradient3887">
11.74 + <stop
11.75 + style="stop-color:#edd400;stop-opacity:1;"
11.76 + offset="0"
11.77 + id="stop3889" />
11.78 + <stop
11.79 + style="stop-color:#fce94f;stop-opacity:1"
11.80 + offset="1"
11.81 + id="stop3891" />
11.82 + </linearGradient>
11.83 + <linearGradient
11.84 + id="linearGradient3800">
11.85 + <stop
11.86 + id="stop3802"
11.87 + offset="0"
11.88 + style="stop-color:#babdb6;stop-opacity:1" />
11.89 + <stop
11.90 + style="stop-color:#eeeeec;stop-opacity:1;"
11.91 + offset="0.5"
11.92 + id="stop3804" />
11.93 + <stop
11.94 + id="stop3806"
11.95 + offset="1"
11.96 + style="stop-color:#babdb6;stop-opacity:1" />
11.97 + </linearGradient>
11.98 + <linearGradient
11.99 + id="linearGradient3792">
11.100 + <stop
11.101 + id="stop3794"
11.102 + offset="0"
11.103 + style="stop-color:#ffffff;stop-opacity:1" />
11.104 + <stop
11.105 + style="stop-color:#ffffff;stop-opacity:1;"
11.106 + offset="0.5"
11.107 + id="stop3796" />
11.108 + <stop
11.109 + id="stop3798"
11.110 + offset="1"
11.111 + style="stop-color:#888a85;stop-opacity:1" />
11.112 + </linearGradient>
11.113 + <linearGradient
11.114 + id="linearGradient3786"
11.115 + inkscape:collect="always">
11.116 + <stop
11.117 + id="stop3788"
11.118 + offset="0"
11.119 + style="stop-color:#888a85;stop-opacity:1" />
11.120 + <stop
11.121 + id="stop3790"
11.122 + offset="1"
11.123 + style="stop-color:#2e3436;stop-opacity:1" />
11.124 + </linearGradient>
11.125 + <linearGradient
11.126 + inkscape:collect="always"
11.127 + id="linearGradient3683">
11.128 + <stop
11.129 + style="stop-color:#000000;stop-opacity:1;"
11.130 + offset="0"
11.131 + id="stop3686" />
11.132 + <stop
11.133 + style="stop-color:#000000;stop-opacity:0;"
11.134 + offset="1"
11.135 + id="stop3688" />
11.136 + </linearGradient>
11.137 + <linearGradient
11.138 + inkscape:collect="always"
11.139 + id="linearGradient3666">
11.140 + <stop
11.141 + style="stop-color:#eeeeec;stop-opacity:1;"
11.142 + offset="0"
11.143 + id="stop3668" />
11.144 + <stop
11.145 + style="stop-color:#e9b96e;stop-opacity:1"
11.146 + offset="1"
11.147 + id="stop3670" />
11.148 + </linearGradient>
11.149 + <linearGradient
11.150 + inkscape:collect="always"
11.151 + id="linearGradient3622">
11.152 + <stop
11.153 + style="stop-color:#ffffff;stop-opacity:1;"
11.154 + offset="0"
11.155 + id="stop3624" />
11.156 + <stop
11.157 + style="stop-color:#ffffff;stop-opacity:0;"
11.158 + offset="1"
11.159 + id="stop3626" />
11.160 + </linearGradient>
11.161 + <linearGradient
11.162 + id="linearGradient3551"
11.163 + inkscape:collect="always">
11.164 + <stop
11.165 + id="stop3553"
11.166 + offset="0"
11.167 + style="stop-color:#ffffff;stop-opacity:1;" />
11.168 + <stop
11.169 + id="stop3555"
11.170 + offset="1"
11.171 + style="stop-color:#888a85;stop-opacity:1" />
11.172 + </linearGradient>
11.173 + <linearGradient
11.174 + inkscape:collect="always"
11.175 + id="linearGradient3539">
11.176 + <stop
11.177 + style="stop-color:#ffffff;stop-opacity:1;"
11.178 + offset="0"
11.179 + id="stop3541" />
11.180 + <stop
11.181 + style="stop-color:#888a85;stop-opacity:1"
11.182 + offset="1"
11.183 + id="stop3543" />
11.184 + </linearGradient>
11.185 + <linearGradient
11.186 + inkscape:collect="always"
11.187 + id="linearGradient3517">
11.188 + <stop
11.189 + style="stop-color:#ffffff;stop-opacity:1;"
11.190 + offset="0"
11.191 + id="stop3519" />
11.192 + <stop
11.193 + style="stop-color:#eeeeec;stop-opacity:1"
11.194 + offset="1"
11.195 + id="stop3521" />
11.196 + </linearGradient>
11.197 + <linearGradient
11.198 + inkscape:collect="always"
11.199 + id="linearGradient3470">
11.200 + <stop
11.201 + style="stop-color:#f5e0be;stop-opacity:1"
11.202 + offset="0"
11.203 + id="stop3472" />
11.204 + <stop
11.205 + style="stop-color:#8ae234;stop-opacity:1"
11.206 + offset="1"
11.207 + id="stop3474" />
11.208 + </linearGradient>
11.209 + <linearGradient
11.210 + inkscape:collect="always"
11.211 + id="linearGradient3452">
11.212 + <stop
11.213 + style="stop-color:#ffffff;stop-opacity:1;"
11.214 + offset="0"
11.215 + id="stop3454" />
11.216 + <stop
11.217 + style="stop-color:#ffffff;stop-opacity:0;"
11.218 + offset="1"
11.219 + id="stop3456" />
11.220 + </linearGradient>
11.221 + <linearGradient
11.222 + inkscape:collect="always"
11.223 + id="linearGradient3270">
11.224 + <stop
11.225 + style="stop-color:#e9b96e;stop-opacity:1;"
11.226 + offset="0"
11.227 + id="stop3272" />
11.228 + <stop
11.229 + style="stop-color:#e9b96e;stop-opacity:0;"
11.230 + offset="1"
11.231 + id="stop3274" />
11.232 + </linearGradient>
11.233 + <linearGradient
11.234 + inkscape:collect="always"
11.235 + id="linearGradient3264">
11.236 + <stop
11.237 + style="stop-color:#e9b96e;stop-opacity:1"
11.238 + offset="0"
11.239 + id="stop3266" />
11.240 + <stop
11.241 + style="stop-color:#e9b96e;stop-opacity:0"
11.242 + offset="1"
11.243 + id="stop3268" />
11.244 + </linearGradient>
11.245 + <linearGradient
11.246 + id="linearGradient3251"
11.247 + inkscape:collect="always">
11.248 + <stop
11.249 + id="stop3253"
11.250 + offset="0"
11.251 + style="stop-color:#8f5902;stop-opacity:1" />
11.252 + <stop
11.253 + id="stop3255"
11.254 + offset="1"
11.255 + style="stop-color:#8f5902;stop-opacity:0" />
11.256 + </linearGradient>
11.257 + <linearGradient
11.258 + inkscape:collect="always"
11.259 + id="linearGradient3243">
11.260 + <stop
11.261 + style="stop-color:#000000;stop-opacity:1;"
11.262 + offset="0"
11.263 + id="stop3245" />
11.264 + <stop
11.265 + style="stop-color:#000000;stop-opacity:0"
11.266 + offset="1"
11.267 + id="stop3247" />
11.268 + </linearGradient>
11.269 + <linearGradient
11.270 + id="linearGradient3703">
11.271 + <stop
11.272 + style="stop-color:black;stop-opacity:0;"
11.273 + offset="0"
11.274 + id="stop3705" />
11.275 + <stop
11.276 + id="stop3711"
11.277 + offset="0.5"
11.278 + style="stop-color:black;stop-opacity:1;" />
11.279 + <stop
11.280 + style="stop-color:black;stop-opacity:0;"
11.281 + offset="1"
11.282 + id="stop3707" />
11.283 + </linearGradient>
11.284 + <linearGradient
11.285 + inkscape:collect="always"
11.286 + id="linearGradient3681">
11.287 + <stop
11.288 + style="stop-color:black;stop-opacity:1;"
11.289 + offset="0"
11.290 + id="stop3683" />
11.291 + <stop
11.292 + style="stop-color:black;stop-opacity:0;"
11.293 + offset="1"
11.294 + id="stop3685" />
11.295 + </linearGradient>
11.296 + <linearGradient
11.297 + id="linearGradient4210">
11.298 + <stop
11.299 + id="stop4212"
11.300 + offset="0.0000000"
11.301 + style="stop-color:#eaba6f;stop-opacity:1.0000000;" />
11.302 + <stop
11.303 + id="stop4214"
11.304 + offset="1.0000000"
11.305 + style="stop-color:#b97a1b;stop-opacity:1.0000000;" />
11.306 + </linearGradient>
11.307 + <linearGradient
11.308 + inkscape:collect="always"
11.309 + xlink:href="#linearGradient3622"
11.310 + id="linearGradient3645"
11.311 + gradientUnits="userSpaceOnUse"
11.312 + x1="48.25"
11.313 + y1="33.75"
11.314 + x2="50.5"
11.315 + y2="48.125" />
11.316 + <linearGradient
11.317 + inkscape:collect="always"
11.318 + xlink:href="#linearGradient3666"
11.319 + id="linearGradient3672"
11.320 + x1="66.840225"
11.321 + y1="18.675386"
11.322 + x2="71.5625"
11.323 + y2="40.005543"
11.324 + gradientUnits="userSpaceOnUse"
11.325 + gradientTransform="translate(-40,1)" />
11.326 + <linearGradient
11.327 + inkscape:collect="always"
11.328 + xlink:href="#linearGradient3683"
11.329 + id="linearGradient3690"
11.330 + x1="18.9375"
11.331 + y1="33.899853"
11.332 + x2="18.9375"
11.333 + y2="36.052185"
11.334 + gradientUnits="userSpaceOnUse"
11.335 + gradientTransform="translate(0,1)" />
11.336 + <linearGradient
11.337 + inkscape:collect="always"
11.338 + xlink:href="#linearGradient3270"
11.339 + id="linearGradient3734"
11.340 + gradientUnits="userSpaceOnUse"
11.341 + x1="22.1875"
11.342 + y1="20"
11.343 + x2="22.1875"
11.344 + y2="24.079771"
11.345 + gradientTransform="translate(0,1)" />
11.346 + <linearGradient
11.347 + inkscape:collect="always"
11.348 + xlink:href="#linearGradient3251"
11.349 + id="linearGradient3736"
11.350 + gradientUnits="userSpaceOnUse"
11.351 + gradientTransform="matrix(1,0,0,-1,0,49)"
11.352 + x1="10.74916"
11.353 + y1="21.5"
11.354 + x2="12.109532"
11.355 + y2="21.5" />
11.356 + <linearGradient
11.357 + inkscape:collect="always"
11.358 + xlink:href="#linearGradient3264"
11.359 + id="linearGradient3738"
11.360 + gradientUnits="userSpaceOnUse"
11.361 + gradientTransform="matrix(-1,0,0,-1,46.92613,49)"
11.362 + x1="11.12416"
11.363 + y1="21.5625"
11.364 + x2="13.168094"
11.365 + y2="21.5625" />
11.366 + <radialGradient
11.367 + inkscape:collect="always"
11.368 + xlink:href="#linearGradient3786"
11.369 + id="radialGradient3740"
11.370 + gradientUnits="userSpaceOnUse"
11.371 + gradientTransform="matrix(1.22665,0,0,0.6587882,-4.355929,9.4385304)"
11.372 + cx="19.21875"
11.373 + cy="22.255209"
11.374 + fx="19.21875"
11.375 + fy="22.255209"
11.376 + r="4.46875" />
11.377 + <linearGradient
11.378 + inkscape:collect="always"
11.379 + xlink:href="#linearGradient3452"
11.380 + id="linearGradient3746"
11.381 + gradientUnits="userSpaceOnUse"
11.382 + x1="28.59375"
11.383 + y1="20.875"
11.384 + x2="38.53125"
11.385 + y2="29.5" />
11.386 + <linearGradient
11.387 + inkscape:collect="always"
11.388 + xlink:href="#linearGradient3517"
11.389 + id="linearGradient3750"
11.390 + gradientUnits="userSpaceOnUse"
11.391 + x1="2.0517766"
11.392 + y1="23.775574"
11.393 + x2="2.0517766"
11.394 + y2="20.549225"
11.395 + gradientTransform="translate(10,1)" />
11.396 + <linearGradient
11.397 + inkscape:collect="always"
11.398 + xlink:href="#linearGradient3539"
11.399 + id="linearGradient3752"
11.400 + gradientUnits="userSpaceOnUse"
11.401 + x1="12.8125"
11.402 + y1="16.279297"
11.403 + x2="12.8125"
11.404 + y2="13.742194"
11.405 + gradientTransform="translate(0,1)" />
11.406 + <linearGradient
11.407 + inkscape:collect="always"
11.408 + xlink:href="#linearGradient3243"
11.409 + id="linearGradient3756"
11.410 + gradientUnits="userSpaceOnUse"
11.411 + x1="20.78125"
11.412 + y1="24.59375"
11.413 + x2="20.8125"
11.414 + y2="23.53125" />
11.415 + <radialGradient
11.416 + inkscape:collect="always"
11.417 + xlink:href="#linearGradient3681"
11.418 + id="radialGradient3768"
11.419 + gradientUnits="userSpaceOnUse"
11.420 + gradientTransform="matrix(0.990017,0,0,1.1,32.1147,-5.15)"
11.421 + cx="5"
11.422 + cy="41.5"
11.423 + fx="5"
11.424 + fy="41.5"
11.425 + r="5" />
11.426 + <radialGradient
11.427 + inkscape:collect="always"
11.428 + xlink:href="#linearGradient3681"
11.429 + id="radialGradient3770"
11.430 + gradientUnits="userSpaceOnUse"
11.431 + gradientTransform="matrix(0.99001,0,0,1.1,-14.88523,-86.15)"
11.432 + cx="5"
11.433 + cy="41.5"
11.434 + fx="5"
11.435 + fy="41.5"
11.436 + r="5" />
11.437 + <linearGradient
11.438 + inkscape:collect="always"
11.439 + xlink:href="#linearGradient3703"
11.440 + id="linearGradient3772"
11.441 + gradientUnits="userSpaceOnUse"
11.442 + gradientTransform="matrix(1.179548,0,0,1,-4.219389,0)"
11.443 + x1="17.554192"
11.444 + y1="46.000275"
11.445 + x2="17.554192"
11.446 + y2="34.999718" />
11.447 + <linearGradient
11.448 + inkscape:collect="always"
11.449 + xlink:href="#linearGradient4210"
11.450 + id="linearGradient3779"
11.451 + gradientUnits="userSpaceOnUse"
11.452 + gradientTransform="matrix(1.0018526,0,0,-1.3412436,-1.3825e-2,57.988076)"
11.453 + x1="17.379599"
11.454 + y1="20.096134"
11.455 + x2="17.379599"
11.456 + y2="37.446911" />
11.457 + <linearGradient
11.458 + inkscape:collect="always"
11.459 + xlink:href="#linearGradient3887"
11.460 + id="linearGradient3893"
11.461 + x1="13.89607"
11.462 + y1="4.6658931"
11.463 + x2="12.919692"
11.464 + y2="13.139417"
11.465 + gradientUnits="userSpaceOnUse" />
11.466 + <linearGradient
11.467 + inkscape:collect="always"
11.468 + xlink:href="#linearGradient3887"
11.469 + id="linearGradient3917"
11.470 + gradientUnits="userSpaceOnUse"
11.471 + x1="13.89607"
11.472 + y1="4.6658931"
11.473 + x2="12.919692"
11.474 + y2="13.139417" />
11.475 + <linearGradient
11.476 + inkscape:collect="always"
11.477 + xlink:href="#linearGradient3919"
11.478 + id="linearGradient3925"
11.479 + x1="10.8125"
11.480 + y1="1.5625"
11.481 + x2="16"
11.482 + y2="26.4375"
11.483 + gradientUnits="userSpaceOnUse" />
11.484 + <linearGradient
11.485 + inkscape:collect="always"
11.486 + xlink:href="#linearGradient3800"
11.487 + id="linearGradient3934"
11.488 + gradientUnits="userSpaceOnUse"
11.489 + gradientTransform="matrix(1,0,0,-1,0,48)"
11.490 + x1="27.616999"
11.491 + y1="15.720971"
11.492 + x2="35.25803"
11.493 + y2="15.5" />
11.494 + <radialGradient
11.495 + inkscape:collect="always"
11.496 + xlink:href="#linearGradient3792"
11.497 + id="radialGradient3936"
11.498 + gradientUnits="userSpaceOnUse"
11.499 + gradientTransform="matrix(1.3566902,0,0,0.7525334,-11.151648,1.0040626)"
11.500 + cx="31.264236"
11.501 + cy="12.943277"
11.502 + fx="31.264236"
11.503 + fy="12.943277"
11.504 + r="4.5557737" />
11.505 + <linearGradient
11.506 + inkscape:collect="always"
11.507 + xlink:href="#linearGradient3938"
11.508 + id="linearGradient3944"
11.509 + x1="27.225912"
11.510 + y1="15.13085"
11.511 + x2="36.394157"
11.512 + y2="19.403521"
11.513 + gradientUnits="userSpaceOnUse" />
11.514 + <radialGradient
11.515 + inkscape:collect="always"
11.516 + xlink:href="#linearGradient3681"
11.517 + id="radialGradient3341"
11.518 + gradientUnits="userSpaceOnUse"
11.519 + gradientTransform="matrix(0.990017,0,0,1.1,32.1147,-5.15)"
11.520 + cx="5"
11.521 + cy="41.5"
11.522 + fx="5"
11.523 + fy="41.5"
11.524 + r="5" />
11.525 + <radialGradient
11.526 + inkscape:collect="always"
11.527 + xlink:href="#linearGradient3681"
11.528 + id="radialGradient3343"
11.529 + gradientUnits="userSpaceOnUse"
11.530 + gradientTransform="matrix(0.99001,0,0,1.1,-14.88523,-86.15)"
11.531 + cx="5"
11.532 + cy="41.5"
11.533 + fx="5"
11.534 + fy="41.5"
11.535 + r="5" />
11.536 + <linearGradient
11.537 + inkscape:collect="always"
11.538 + xlink:href="#linearGradient3703"
11.539 + id="linearGradient3345"
11.540 + gradientUnits="userSpaceOnUse"
11.541 + gradientTransform="matrix(1.179548,0,0,1,-4.219389,0)"
11.542 + x1="17.554192"
11.543 + y1="46.000275"
11.544 + x2="17.554192"
11.545 + y2="34.999718" />
11.546 + <linearGradient
11.547 + inkscape:collect="always"
11.548 + xlink:href="#linearGradient3517"
11.549 + id="linearGradient2379"
11.550 + gradientUnits="userSpaceOnUse"
11.551 + gradientTransform="matrix(0.9659258,0.258819,0.258819,-0.9659258,12.365949,46.030428)"
11.552 + x1="2.0517766"
11.553 + y1="23.775574"
11.554 + x2="2.0517766"
11.555 + y2="20.549225" />
11.556 + <linearGradient
11.557 + inkscape:collect="always"
11.558 + xlink:href="#linearGradient3551"
11.559 + id="linearGradient2381"
11.560 + gradientUnits="userSpaceOnUse"
11.561 + gradientTransform="translate(3,0)"
11.562 + x1="12.5"
11.563 + y1="16.248047"
11.564 + x2="12.5"
11.565 + y2="13.748305" />
11.566 + <linearGradient
11.567 + inkscape:collect="always"
11.568 + xlink:href="#linearGradient3517"
11.569 + id="linearGradient2403"
11.570 + gradientUnits="userSpaceOnUse"
11.571 + gradientTransform="translate(13,0)"
11.572 + x1="2.0517766"
11.573 + y1="23.775574"
11.574 + x2="2.0517766"
11.575 + y2="20.549225" />
11.576 + <linearGradient
11.577 + inkscape:collect="always"
11.578 + xlink:href="#linearGradient3539"
11.579 + id="linearGradient2405"
11.580 + gradientUnits="userSpaceOnUse"
11.581 + x1="12.8125"
11.582 + y1="16.279297"
11.583 + x2="12.8125"
11.584 + y2="13.742194"
11.585 + gradientTransform="translate(3,0)" />
11.586 + <radialGradient
11.587 + inkscape:collect="always"
11.588 + xlink:href="#linearGradient3470"
11.589 + id="radialGradient2439"
11.590 + gradientUnits="userSpaceOnUse"
11.591 + gradientTransform="matrix(1.4456279,0,0,1.2531601,-10.145615,-5.696102)"
11.592 + cx="27.23303"
11.593 + cy="22.5"
11.594 + fx="27.23303"
11.595 + fy="22.5"
11.596 + r="7" />
11.597 + <linearGradient
11.598 + inkscape:collect="always"
11.599 + xlink:href="#linearGradient2384"
11.600 + id="linearGradient2390"
11.601 + x1="20.8125"
11.602 + y1="15.28125"
11.603 + x2="22.718748"
11.604 + y2="24.59375"
11.605 + gradientUnits="userSpaceOnUse" />
11.606 + <linearGradient
11.607 + inkscape:collect="always"
11.608 + xlink:href="#linearGradient2384"
11.609 + id="linearGradient2392"
11.610 + x1="10.5"
11.611 + y1="19.836557"
11.612 + x2="10.5"
11.613 + y2="21.077166"
11.614 + gradientUnits="userSpaceOnUse"
11.615 + gradientTransform="translate(0,1)" />
11.616 + <linearGradient
11.617 + inkscape:collect="always"
11.618 + xlink:href="#linearGradient2394"
11.619 + id="linearGradient2400"
11.620 + x1="13.5625"
11.621 + y1="19.84375"
11.622 + x2="13.5625"
11.623 + y2="21.3125"
11.624 + gradientUnits="userSpaceOnUse" />
11.625 + </defs>
11.626 + <sodipodi:namedview
11.627 + inkscape:window-y="145"
11.628 + inkscape:window-x="785"
11.629 + inkscape:window-height="905"
11.630 + inkscape:window-width="895"
11.631 + stroke="#c17d11"
11.632 + fill="#e9b96e"
11.633 + inkscape:showpageshadow="false"
11.634 + inkscape:document-units="px"
11.635 + inkscape:grid-bbox="true"
11.636 + showgrid="false"
11.637 + inkscape:current-layer="layer1"
11.638 + inkscape:cy="9.9678443"
11.639 + inkscape:cx="30.274133"
11.640 + inkscape:zoom="1"
11.641 + inkscape:pageshadow="2"
11.642 + inkscape:pageopacity="0.0"
11.643 + borderopacity="1"
11.644 + bordercolor="#e0e0e0"
11.645 + pagecolor="#ffffff"
11.646 + id="base"
11.647 + showguides="false"
11.648 + inkscape:guide-bbox="true"
11.649 + showborder="true"
11.650 + gridspacingx="0.5px"
11.651 + gridspacingy="0.5px"
11.652 + gridempspacing="2"
11.653 + inkscape:grid-points="false">
11.654 + <sodipodi:guide
11.655 + orientation="horizontal"
11.656 + position="27.499825"
11.657 + id="guide3495" />
11.658 + </sodipodi:namedview>
11.659 + <metadata
11.660 + id="metadata4">
11.661 + <rdf:RDF>
11.662 + <cc:Work
11.663 + rdf:about="">
11.664 + <dc:format>image/svg+xml</dc:format>
11.665 + <dc:type
11.666 + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
11.667 + <dc:title>Misc Stuff</dc:title>
11.668 + <dc:creator>
11.669 + <cc:Agent>
11.670 + <dc:title>Lapo Calamandrei</dc:title>
11.671 + </cc:Agent>
11.672 + </dc:creator>
11.673 + <dc:source />
11.674 + <dc:subject>
11.675 + <rdf:Bag>
11.676 + <rdf:li>stuff</rdf:li>
11.677 + <rdf:li>box</rdf:li>
11.678 + <rdf:li>misc</rdf:li>
11.679 + <rdf:li>various</rdf:li>
11.680 + <rdf:li>mess</rdf:li>
11.681 + </rdf:Bag>
11.682 + </dc:subject>
11.683 + <cc:license
11.684 + rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
11.685 + <dc:contributor>
11.686 + <cc:Agent>
11.687 + <dc:title>Jakub Steiner</dc:title>
11.688 + </cc:Agent>
11.689 + </dc:contributor>
11.690 + <dc:date>2007-01-12</dc:date>
11.691 + </cc:Work>
11.692 + <cc:License
11.693 + rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
11.694 + <cc:permits
11.695 + rdf:resource="http://web.resource.org/cc/Reproduction" />
11.696 + <cc:permits
11.697 + rdf:resource="http://web.resource.org/cc/Distribution" />
11.698 + <cc:requires
11.699 + rdf:resource="http://web.resource.org/cc/Notice" />
11.700 + <cc:permits
11.701 + rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
11.702 + <cc:requires
11.703 + rdf:resource="http://web.resource.org/cc/ShareAlike" />
11.704 + <cc:requires
11.705 + rdf:resource="http://web.resource.org/cc/SourceCode" />
11.706 + </cc:License>
11.707 + </rdf:RDF>
11.708 + </metadata>
11.709 + <g
11.710 + inkscape:groupmode="layer"
11.711 + inkscape:label="Layer 1"
11.712 + id="layer1">
11.713 + <g
11.714 + id="g3760"
11.715 + style="opacity:0.17241378"
11.716 + transform="matrix(1,0,0,1.0909091,0,-2.181818)">
11.717 + <rect
11.718 + y="35"
11.719 + x="37.064781"
11.720 + height="11"
11.721 + width="4.9352183"
11.722 + id="rect3762"
11.723 + style="opacity:1;fill:url(#radialGradient3768);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.724 + <rect
11.725 + transform="scale(-1,-1)"
11.726 + y="-46"
11.727 + x="-9.9351835"
11.728 + height="11"
11.729 + width="4.9351835"
11.730 + id="rect3764"
11.731 + style="opacity:1;fill:url(#radialGradient3770);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.732 + <rect
11.733 + y="35"
11.734 + x="9.9351835"
11.735 + height="11"
11.736 + width="27.129599"
11.737 + id="rect3766"
11.738 + style="opacity:1;fill:url(#linearGradient3772);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.739 + </g>
11.740 + <g
11.741 + id="g3333"
11.742 + style="opacity:0.29714286"
11.743 + transform="matrix(1.02239,0,0,0.6818183,-0.5261638,14.343465)">
11.744 + <rect
11.745 + y="35"
11.746 + x="37.064781"
11.747 + height="11"
11.748 + width="4.9352183"
11.749 + id="rect3335"
11.750 + style="opacity:1;fill:url(#radialGradient3341);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.751 + <rect
11.752 + transform="scale(-1,-1)"
11.753 + y="-46"
11.754 + x="-9.9351835"
11.755 + height="11"
11.756 + width="4.9351835"
11.757 + id="rect3337"
11.758 + style="opacity:1;fill:url(#radialGradient3343);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.759 + <rect
11.760 + y="35"
11.761 + x="9.9351835"
11.762 + height="11"
11.763 + width="27.129599"
11.764 + id="rect3339"
11.765 + style="opacity:1;fill:url(#linearGradient3345);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
11.766 + </g>
11.767 + <path
11.768 + style="color:#000000;fill:url(#linearGradient3779);fill-opacity:1;fill-rule:nonzero;stroke:#a0670c;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.769 + d="M 11.78125,18.5 C 10.435791,18.5 9.719445,19.195548 9.34375,20.28125 L 7.46875,26.28125 L 6.5,34.5 L 7.46875,34.5 L 7.46875,41.09375 C 7.46875,42.431583 8.560792,43.500001 9.90625,43.5 L 37.0625,43.5 C 38.407959,43.5 39.499998,42.431582 39.5,41.09375 L 39.5,34.5 L 40.5,34.5 L 39.5,26.28125 L 37.5625,20.40625 C 37.090576,18.976725 36.157962,18.499999 34.8125,18.5 L 11.78125,18.5 z "
11.770 + id="path3591"
11.771 + sodipodi:nodetypes="ccccccccccccccc" />
11.772 + <path
11.773 + style="color:#000000;fill:url(#linearGradient3672);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.774 + d="M 7.875,26.502816 L 7.03125,34 L 39.96875,34 L 39.09375,26.502816 L 7.875,26.502816 z "
11.775 + id="path3651"
11.776 + sodipodi:nodetypes="ccccc" />
11.777 + <g
11.778 + id="g3630"
11.779 + style="opacity:0.69348659"
11.780 + transform="translate(-40,1)">
11.781 + <path
11.782 + d="M 51.78125,18.5 C 51.28084,18.5 51.016779,18.620824 50.8125,18.78125 C 50.608221,18.941676 50.426448,19.174149 50.28125,19.59375 L 48.4375,25.53125 L 48.4375,25.59375 L 47.625,32.53125 C 48.103888,32.606958 48.459499,33.015253 48.46875,33.5 L 48.46875,40.09375 C 48.46875,40.887398 49.090187,41.500001 49.90625,41.5 L 77.0625,41.5 C 77.878564,41.5 78.499999,40.887399 78.5,40.09375 L 78.5,33.5 C 78.496071,32.993079 78.872044,32.563396 79.375,32.5 L 78.5,25.40625 L 76.625,19.71875 C 76.440137,19.158774 76.215378,18.90959 75.96875,18.75 C 75.722122,18.59041 75.367124,18.5 74.8125,18.5 L 51.78125,18.5 z "
11.783 + id="path3606"
11.784 + style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3645);stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.785 + inkscape:original="M 51.78125 17.5 C 50.435791 17.5 49.719445 18.195548 49.34375 19.28125 L 47.46875 25.28125 L 46.5 33.5 L 47.46875 33.5 L 47.46875 40.09375 C 47.46875 41.431583 48.560792 42.500001 49.90625 42.5 L 77.0625 42.5 C 78.407959 42.5 79.499998 41.431582 79.5 40.09375 L 79.5 33.5 L 80.5 33.5 L 79.5 25.28125 L 77.5625 19.40625 C 77.090576 17.976725 76.157962 17.499999 74.8125 17.5 L 51.78125 17.5 z "
11.786 + inkscape:radius="-1"
11.787 + sodipodi:type="inkscape:offset" />
11.788 + <rect
11.789 + ry="0.5"
11.790 + rx="0.5"
11.791 + y="32"
11.792 + x="47"
11.793 + height="1"
11.794 + width="33"
11.795 + id="rect3610"
11.796 + style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.797 + </g>
11.798 + <path
11.799 + style="opacity:0.35;color:#000000;fill:url(#linearGradient3690);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.800 + d="M 7.96875,34 L 7.96875,41.09375 C 7.96875,42.159491 8.82549,43.000001 9.90625,43 L 37.0625,43 C 38.143262,43 38.999998,42.159491 39,41.09375 L 39,34 L 7.96875,34 z "
11.801 + id="path3678"
11.802 + sodipodi:nodetypes="ccccccc" />
11.803 + <rect
11.804 + style="opacity:1;color:#000000;fill:#a0670c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.805 + id="rect3600"
11.806 + width="33.0625"
11.807 + height="1"
11.808 + x="7"
11.809 + y="34" />
11.810 + <path
11.811 + style="opacity:0.6;color:#000000;fill:url(#linearGradient3734);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.812 + d="M 11.78125,20 C 11.367,20 11.234304,20.070411 11.125,20.15625 C 11.015696,20.242089 10.873873,20.423275 10.75,20.78125 L 9.125,26 L 37.8125,26 L 36.15625,20.96875 C 35.947593,20.450065 35.798273,20.282879 35.65625,20.1875 C 35.514227,20.092121 35.297418,20 34.8125,20 L 11.78125,20 z "
11.813 + id="path3692" />
11.814 + <path
11.815 + style="opacity:0.6;color:#000000;fill:url(#linearGradient3736);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.816 + d="M 11.78125,20 C 11.367,20 11.234304,20.070411 11.125,20.15625 C 11.015696,20.242089 10.873873,20.423275 10.75,20.78125 L 9.125,26 L 14,26 L 14,20 L 11.78125,20 z "
11.817 + id="path3694" />
11.818 + <g
11.819 + id="g3899"
11.820 + transform="translate(5,0)"
11.821 + style="opacity:0.84000005">
11.822 + <path
11.823 + style="color:#000000;fill:url(#linearGradient3917);fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.824 + d="M 11.5,2.5 L 16.5,2.5 L 16.391747,23.437502 L 11.5,23.500002 L 11.5,2.5 z "
11.825 + id="path3901"
11.826 + sodipodi:nodetypes="ccccc" />
11.827 + <rect
11.828 + y="3.5"
11.829 + x="12.5"
11.830 + height="19.000002"
11.831 + width="3"
11.832 + id="rect3903"
11.833 + style="opacity:0.80459768;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3925);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.834 + <g
11.835 + id="g3905">
11.836 + <rect
11.837 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.838 + id="rect3907"
11.839 + width="2"
11.840 + height="1.0312499"
11.841 + x="14"
11.842 + y="6" />
11.843 + <rect
11.844 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.845 + id="rect3909"
11.846 + width="2"
11.847 + height="1.0312499"
11.848 + x="14"
11.849 + y="9" />
11.850 + <rect
11.851 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.852 + id="rect3911"
11.853 + width="2"
11.854 + height="1.0312499"
11.855 + x="14"
11.856 + y="12" />
11.857 + <rect
11.858 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.859 + id="rect3913"
11.860 + width="2"
11.861 + height="1.0312499"
11.862 + x="14"
11.863 + y="15" />
11.864 + <rect
11.865 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.866 + id="rect3915"
11.867 + width="2"
11.868 + height="1.0312499"
11.869 + x="14"
11.870 + y="18" />
11.871 + </g>
11.872 + </g>
11.873 + <path
11.874 + style="opacity:0.67049806;color:#000000;fill:url(#linearGradient3738);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.875 + d="M 35.144876,20 C 35.559126,20 35.691822,20.070411 35.801126,20.15625 C 35.91043,20.242089 36.052253,20.423275 36.176126,20.78125 L 37.801126,26 L 32.926126,26 L 32.926126,20 L 35.144876,20 z "
11.876 + id="path3696" />
11.877 + <g
11.878 + id="g3877"
11.879 + transform="matrix(0.8660254,-0.4999999,0.4999999,0.8660254,-5.991941,14.452399)">
11.880 + <path
11.881 + style="color:#000000;fill:url(#linearGradient3893);fill-opacity:1;fill-rule:nonzero;stroke:#b89600;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.882 + d="M 11.5,2.5 L 16.5,2.5 L 16.391747,23.437502 L 11.586278,20.663063 L 11.5,2.5 z "
11.883 + id="rect3846"
11.884 + sodipodi:nodetypes="ccccc" />
11.885 + <path
11.886 + style="opacity:0.87459765;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.887 + d="M 12.5,3.5 L 15.5,3.5 L 15.5,22.500002 L 12.587921,21.035219 L 12.5,3.5 z "
11.888 + id="rect3858"
11.889 + sodipodi:nodetypes="ccccc" />
11.890 + <g
11.891 + id="g3870">
11.892 + <rect
11.893 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.894 + id="rect3860"
11.895 + width="2"
11.896 + height="1.0312499"
11.897 + x="14"
11.898 + y="6" />
11.899 + <rect
11.900 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.901 + id="rect3862"
11.902 + width="2"
11.903 + height="1.0312499"
11.904 + x="14"
11.905 + y="9" />
11.906 + <rect
11.907 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.908 + id="rect3864"
11.909 + width="2"
11.910 + height="1.0312499"
11.911 + x="14"
11.912 + y="12" />
11.913 + <rect
11.914 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.915 + id="rect3866"
11.916 + width="2"
11.917 + height="1.0312499"
11.918 + x="14"
11.919 + y="15" />
11.920 + <rect
11.921 + style="opacity:0.62068942;color:#000000;fill:#c4a000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.922 + id="rect3868"
11.923 + width="2"
11.924 + height="1.0312499"
11.925 + x="14"
11.926 + y="18" />
11.927 + </g>
11.928 + </g>
11.929 + <path
11.930 + style="opacity:1;color:#000000;fill:url(#radialGradient3740);fill-opacity:1;fill-rule:nonzero;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.931 + d="M 20.96875,22.5 C 18.778,22.5 17,23.844 17,25.5 C 17,25.851327 17.102984,26.186614 17.25,26.5 L 24.6875,26.5 C 24.834516,26.186614 24.9375,25.851327 24.9375,25.5 C 24.9375,23.844 23.159499,22.5 20.96875,22.5 z "
11.932 + id="path3698" />
11.933 + <g
11.934 + id="g3927"
11.935 + transform="matrix(0.9659258,0.258819,-0.258819,0.9659258,9.180442,-11.349362)">
11.936 + <g
11.937 + transform="translate(-2,20)"
11.938 + id="g3700">
11.939 + <path
11.940 + id="path3702"
11.941 + transform="translate(0,-20)"
11.942 + d="M 32.5,6.5 C 30.292236,6.5 28.5,7.172 28.5,8 L 28.47473,26.250876 L 36.5,25.5 C 36.499786,18.95289 36.5,11.439678 36.5,8 C 36.5,7.172 34.707764,6.5 32.5,6.5 z "
11.943 + style="opacity:1;color:#000000;fill:url(#linearGradient3934);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.944 + sodipodi:nodetypes="ccccsc" />
11.945 + <path
11.946 + sodipodi:type="arc"
11.947 + style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient3936);stroke-width:1.11240149;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.948 + id="path3704"
11.949 + sodipodi:cx="32.504814"
11.950 + sodipodi:cy="8.2694378"
11.951 + sodipodi:rx="3.9995728"
11.952 + sodipodi:ry="1.8561553"
11.953 + d="M 36.504387 8.2694378 A 3.9995728 1.8561553 0 1 1 28.505241,8.2694378 A 3.9995728 1.8561553 0 1 1 36.504387 8.2694378 z"
11.954 + transform="matrix(1,0,0,0.808122,0,-18.682714)" />
11.955 + <path
11.956 + style="opacity:0.52873565;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.957 + d="M 36.504387,-4.999999 C 36.504387,-4.171999 34.712578,-3.5 32.504814,-3.5 C 30.29705,-3.5 28.505241,-4.171999 28.505241,-4.999999"
11.958 + id="path3706"
11.959 + sodipodi:nodetypes="csc" />
11.960 + </g>
11.961 + <path
11.962 + id="path3708"
11.963 + d="M 30.5,7.5 C 29.496989,7.5 28.599735,7.661827 28.03125,7.875 C 27.765957,7.974481 27.579146,8.061242 27.5,8.125 L 27.5,25.5 L 33.5,25.5 C 33.499542,19.102534 33.499949,11.605311 33.5,8.125 C 33.420854,8.061242 33.234043,7.974481 32.96875,7.875 C 32.400265,7.661827 31.503011,7.5 30.5,7.5 z "
11.964 + style="opacity:0.81226059;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3944);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.965 + </g>
11.966 + <path
11.967 + style="opacity:1;color:#000000;fill:#75507b;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2392);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.968 + d="M 11.5,15.671875 L 10.5,21.5 L 10.5,26.5 L 14.5,26.5 L 14.5,15.671875 L 13.75,15.5 L 13,15.5 L 12.25,15.5 L 11.5,15.671875 z "
11.969 + id="path3718"
11.970 + sodipodi:nodetypes="ccccccccc" />
11.971 + <path
11.972 + style="color:#000000;fill:url(#linearGradient3750);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.973 + d="M 12.25,16 L 11.9375,16.0625 L 11,21.5 L 11.015625,21.34375 L 11.015625,26.78125 L 13.015625,26.773437 L 13,21.498673 L 14,16.0625 L 13.75,16 L 13,16 L 12.25,16 z "
11.974 + id="path3720"
11.975 + sodipodi:nodetypes="ccccccccccc" />
11.976 + <g
11.977 + id="g2417"
11.978 + transform="translate(0,1)">
11.979 + <path
11.980 + sodipodi:nodetypes="ccccccccc"
11.981 + id="path2387"
11.982 + d="M 14.5,14.671875 L 13.5,20.5 L 13.5,25.5 L 17.5,25.5 L 17.5,14.671875 L 16.75,14.5 L 16,14.5 L 15.25,14.5 L 14.5,14.671875 z "
11.983 + style="opacity:1;color:#000000;fill:#5c3566;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2400);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.984 + <path
11.985 + sodipodi:nodetypes="ccccccccccc"
11.986 + id="path2391"
11.987 + d="M 15.25,15 L 14.9375,15.0625 L 14,20.5 L 14.015625,20.34375 L 14.015625,25.78125 L 16.015625,25.773437 L 16,20.498673 L 17,15.0625 L 16.75,15 L 16,15 L 15.25,15 z "
11.988 + style="color:#000000;fill:url(#linearGradient2403);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.989 + <path
11.990 + sodipodi:nodetypes="cccccccc"
11.991 + id="path2393"
11.992 + d="M 15.25,15 L 14.9375,15.0625 L 14,20.5 L 16,20.498673 L 17,15.0625 L 16.75,15 L 16,15 L 15.25,15 z "
11.993 + style="color:#000000;fill:url(#linearGradient2405);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.994 + <path
11.995 + sodipodi:nodetypes="ccccc"
11.996 + id="path2395"
11.997 + d="M 15.6875,17.5 L 15.3125,20.5 L 15.40625,25.78125 L 15.46875,20.5 L 15.6875,17.5 z "
11.998 + style="opacity:0.31800764;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.999 + <path
11.1000 + id="path2397"
11.1001 + d="M 15.3125,15.03125 L 14.3125,20.5 L 14.40625,25.78125 L 14.46875,20.5 L 15.3125,15.03125 z "
11.1002 + style="opacity:0.26819925;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.1003 + <path
11.1004 + sodipodi:nodetypes="ccccc"
11.1005 + id="path2399"
11.1006 + d="M 15.15625,18.4375 L 14.875,20.5 L 14.984375,24.609375 L 15.03125,20.5 L 15.15625,18.4375 z "
11.1007 + style="opacity:0.51340996;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.1008 + </g>
11.1009 + <path
11.1010 + style="color:#000000;fill:url(#linearGradient3752);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.1011 + d="M 12.25,16 L 11.9375,16.0625 L 11,21.5 L 13,21.498673 L 14,16.0625 L 13.75,16 L 13,16 L 12.25,16 z "
11.1012 + id="path3722"
11.1013 + sodipodi:nodetypes="cccccccc" />
11.1014 + <path
11.1015 + style="opacity:0.31800764;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
11.1016 + d="M 12.6875,18.5 L 12.3125,21.5 L 12.40625,26.78125 L 12.46875,21.5 L 12.6875,18.5 z "
11.1017 + id="path3951"
11.1018 + sodipodi:nodetypes="ccccc" />
11.1019 + <path
11.1020 + style="opacity:0.26819925;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
11.1021 + d="M 12.3125,16.03125 L 11.3125,21.5 L 11.40625,26.78125 L 11.46875,21.5 L 12.3125,16.03125 z "
11.1022 + id="path3948" />
11.1023 + <g
11.1024 + id="g2371"
11.1025 + transform="matrix(0.9659258,-0.258819,0.258819,0.9659258,-0.3160868,6.8029688)">
11.1026 + <path
11.1027 + style="opacity:1;color:#000000;fill:#75507b;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2390);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.1028 + d="M 19.75,15 L 19.03125,15.1875 L 18.28125,15.40625 L 17.625,15.75 L 18.15625,21.65625 L 19.109375,25.09375 L 23.234375,25.09375 L 20.6875,15.6875 C 20.446816,14.967169 20.013567,14.985925 19.75,15 z "
11.1029 + transform="matrix(0.9659259,0.258819,-0.258819,0.9659259,1.5651722,-5.1030033)"
11.1030 + id="path3724"
11.1031 + sodipodi:nodetypes="ccccccccc" />
11.1032 + <path
11.1033 + style="color:#000000;fill:url(#linearGradient2379);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.1034 + d="M 20.125,15.46875 L 19.875,15.5 L 19.15625,15.6875 L 18.40625,15.875 L 18.125,16.03125 L 18.625,21.34375 L 19.71875,25.5 L 21.78125,25.5 L 20.71875,20.96875 L 20.125,15.46875 z "
11.1035 + transform="matrix(0.9659259,0.258819,-0.258819,0.9659259,1.5651722,-5.1030033)"
11.1036 + id="path3726" />
11.1037 + <path
11.1038 + sodipodi:nodetypes="cccccccc"
11.1039 + id="path3732"
11.1040 + d="M 15.25,15 L 14.9375,15.0625 L 14,20.5 L 16.163058,20.493836 L 17,15.0625 L 16.75,15 L 16,15 L 15.25,15 z "
11.1041 + style="color:#000000;fill:url(#linearGradient2381);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.1042 + <path
11.1043 + sodipodi:nodetypes="ccccc"
11.1044 + id="path3955"
11.1045 + d="M 15.8125,17.78125 L 15.46875,20.5 L 15.549362,24.985096 L 15.625,20.5 L 15.8125,17.78125 z "
11.1046 + style="opacity:0.31800764;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.1047 + <path
11.1048 + sodipodi:nodetypes="ccccc"
11.1049 + id="path3957"
11.1050 + d="M 14.573995,19.358831 L 14.3125,20.5 L 14.428658,22.196139 L 14.46875,20.5 L 14.573995,19.358831 z "
11.1051 + style="opacity:0.49425288;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.1052 + <path
11.1053 + sodipodi:nodetypes="ccccc"
11.1054 + id="path3959"
11.1055 + d="M 15.802067,15.219871 L 14.875,20.5 L 14.984375,24.609375 L 15.03125,20.5 L 15.802067,15.219871 z "
11.1056 + style="opacity:0.31800764;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
11.1057 + </g>
11.1058 + <path
11.1059 + style="opacity:0.51340996;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
11.1060 + d="M 12.15625,19.4375 L 11.875,21.5 L 11.984375,25.609375 L 12.03125,21.5 L 12.15625,19.4375 z "
11.1061 + id="path3953"
11.1062 + sodipodi:nodetypes="ccccc" />
11.1063 + <g
11.1064 + id="g2433"
11.1065 + transform="translate(0,1)">
11.1066 + <path
11.1067 + sodipodi:nodetypes="ccccccc"
11.1068 + id="path3710"
11.1069 + d="M 26.1875,19.5 C 25.248424,19.5 24.5,20.248425 24.5,21.1875 L 24.5,25.5 L 36.5,25.5 L 36.5,21.1875 C 36.5,20.248424 35.751576,19.5 34.8125,19.5 L 26.1875,19.5 z "
11.1070 + style="opacity:1;color:#000000;fill:#8ae234;fill-opacity:1;fill-rule:nonzero;stroke:#4e9a06;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.1071 + <rect
11.1072 + y="22"
11.1073 + x="25"
11.1074 + height="4"
11.1075 + width="11"
11.1076 + id="rect3712"
11.1077 + style="opacity:0.62452105;color:#000000;fill:#c17d11;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.1078 + <path
11.1079 + style="opacity:0.29501917;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3746);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.1080 + d="M 26.1875,20.5 C 25.786622,20.5 25.5,20.786623 25.5,21.1875 L 25.5,25.5 L 35.5,25.5 L 35.5,21.1875 C 35.5,20.786621 35.213379,20.5 34.8125,20.5 L 26.1875,20.5 z "
11.1081 + id="path3714"
11.1082 + sodipodi:nodetypes="ccccccc" />
11.1083 + <rect
11.1084 + ry="0"
11.1085 + rx="0"
11.1086 + y="22"
11.1087 + x="25"
11.1088 + height="1"
11.1089 + width="11"
11.1090 + id="rect3716"
11.1091 + style="opacity:1;color:#000000;fill:url(#radialGradient2439);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
11.1092 + </g>
11.1093 + <rect
11.1094 + style="opacity:1;color:#000000;fill:#fcf3e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
11.1095 + id="rect3728"
11.1096 + width="31"
11.1097 + height="1.0883883"
11.1098 + x="8"
11.1099 + y="26"
11.1100 + rx="0.5"
11.1101 + ry="0.54419416" />
11.1102 + <path
11.1103 + sodipodi:type="inkscape:offset"
11.1104 + inkscape:radius="-0.5"
11.1105 + inkscape:original="M 11.78125 19 C 11.367 19 11.234304 19.070411 11.125 19.15625 C 11.015696 19.242089 10.873873 19.423275 10.75 19.78125 L 9.125 25 L 37.8125 25 L 36.15625 19.96875 C 35.947593 19.450065 35.798273 19.282879 35.65625 19.1875 C 35.514227 19.092121 35.297418 19 34.8125 19 L 11.78125 19 z "
11.1106 + style="opacity:0.15;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3756);stroke-width:1.00000083;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
11.1107 + id="path3730"
11.1108 + d="M 11.78125,19.5 C 11.602454,19.5 11.502305,19.52161 11.46875,19.53125 C 11.435195,19.54089 11.467082,19.539268 11.4375,19.5625 C 11.431757,19.56701 11.321106,19.641707 11.21875,19.9375 L 9.8125,24.5 L 37.125,24.5 L 35.6875,20.15625 L 35.6875,20.125 C 35.513562,19.703318 35.424965,19.627305 35.375,19.59375 C 35.304793,19.546601 35.234094,19.5 34.8125,19.5 L 11.78125,19.5 z "
11.1109 + transform="translate(0,1)" />
11.1110 + </g>
11.1111 +</svg>
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/app-manager/resources.rc.in Sat Feb 20 12:11:02 2010 +0000
12.3 @@ -0,0 +1,32 @@
12.4 +#include <winver.h>
12.5 +
12.6 +MAINICON ICON "app-manager.ico"
12.7 +
12.8 +VS_VERSION_INFO VERSIONINFO
12.9 + FILEVERSION @PLOVER_MAJOR_VERSION@,@PLOVER_MINOR_VERSION@,
12.10 + @PLOVER_MICRO_VERSION@,0
12.11 + PRODUCTVERSION @PLOVER_MAJOR_VERSION@,@PLOVER_MINOR_VERSION@,
12.12 + @PLOVER_MICRO_VERSION@,0
12.13 + FILEOS VOS__WINDOWS32
12.14 + FILETYPE VFT_APP
12.15 + {
12.16 + BLOCK "StringFileInfo"
12.17 + {
12.18 + BLOCK "080904B0"
12.19 + {
12.20 + VALUE "CompanyName","The plover development team"
12.21 + VALUE "FileDescription","Application Manager"
12.22 + VALUE "FileVersion","@PACKAGE_VERSION@"
12.23 + VALUE "InternalName","app-manager"
12.24 + VALUE "LegalCopyright",
12.25 + "Copyright © 2010 J. Ali Harlow et al"
12.26 + VALUE "OriginalFilename","app-manager.exe"
12.27 + VALUE "ProductName","plover"
12.28 + VALUE "ProductVersion","@PACKAGE_VERSION@"
12.29 + }
12.30 + }
12.31 + BLOCK "VarFileInfo"
12.32 + {
12.33 + VALUE "Translation",0x809,0x4B0
12.34 + }
12.35 + }
13.1 --- a/configure.ac Thu Feb 11 19:47:47 2010 +0000
13.2 +++ b/configure.ac Sat Feb 20 12:11:02 2010 +0000
13.3 @@ -9,10 +9,14 @@
13.4 AC_CONFIG_FILES([Makefile
13.5 plover/Makefile
13.6 plover/plover.pc
13.7 +plover-gtk/Makefile
13.8 +plover-gtk/plover-gtk.pc
13.9 setup/Makefile
13.10 setup/resources.rc
13.11 update/Makefile
13.12 update/resources.rc
13.13 +app-manager/Makefile
13.14 +app-manager/resources.rc
13.15 ])
13.16 AM_INIT_AUTOMAKE(no-define)
13.17 case $VERSION in
13.18 @@ -43,12 +47,19 @@
13.19 # increment CURRENT and set AGE and REVISION to 0.
13.20 # - If the interface is the same as the previous version, increment REVISION.
13.21 #
13.22 -LT_CURRENT=0
13.23 -LT_REVISION=1
13.24 -LT_AGE=0
13.25 -AC_SUBST(LT_CURRENT)
13.26 -AC_SUBST(LT_REVISION)
13.27 -AC_SUBST(LT_AGE)
13.28 +lt_current=0
13.29 +lt_revision=1
13.30 +lt_age=0
13.31 +LIBPLOVER_LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
13.32 +AC_SUBST(LIBPLOVER_LT_VERSION_INFO)
13.33 +
13.34 +# and likewise for plover-gtk.
13.35 +#
13.36 +lt_current=0
13.37 +lt_revision=0
13.38 +lt_age=0
13.39 +PLOVER_GTK_LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
13.40 +AC_SUBST(PLOVER_GTK_LT_VERSION_INFO)
13.41
13.42 ##################################################
13.43 # Checks for programs.
13.44 @@ -75,10 +86,21 @@
13.45 PKG_CHECK_MODULES(RAZOR,[razor >= 0.2],[:],[RAZOR_LIBS=-lrazor])
13.46 PKG_CHECK_MODULES(EXPAT,[expat],[:],[EXPAT_LIBS=-lexpat])
13.47 PKG_CHECK_MODULES(ZLIB,[zlib],[:],[ZLIB_LIBS=-lz])
13.48 +PKG_CHECK_MODULES(GIO,[gio-2.0])
13.49 +PKG_CHECK_MODULES(GTK,[gtk+-2.0])
13.50 +PKG_CHECK_MODULES(GMODULE_EXPORT,[gmodule-export-2.0])
13.51 LIBPLOVER_CFLAGS="$RAZOR_CFLAGS $EXPAT_CFLAGS $ZLIB_CFLAGS"
13.52 LIBPLOVER_LIBS="$RAZOR_LIBS $EXPAT_LIBS $ZLIB_LIBS"
13.53 AC_SUBST(LIBPLOVER_CFLAGS)
13.54 AC_SUBST(LIBPLOVER_LIBS)
13.55 +PLOVER_GTK_CFLAGS="$GTK_CFLAGS $RAZOR_CFLAGS"
13.56 +PLOVER_GTK_LIBS="$GTK_LIBS $RAZOR_LIBS"
13.57 +AC_SUBST(PLOVER_GTK_CFLAGS)
13.58 +AC_SUBST(PLOVER_GTK_LIBS)
13.59 +GUI_CFLAGS="$GMODULE_EXPORT_CFLAGS $GIO_CFLAGS $PLOVER_GTK_CFLAGS $LIBPLOVER_CFLAGS"
13.60 +GUI_LIBS="$GMODULE_EXPORT_LIBS $GIO_LIBS $PLOVER_GTK_LIBS $LIBPLOVER_LIBS"
13.61 +AC_SUBST(GUI_CFLAGS)
13.62 +AC_SUBST(GUI_LIBS)
13.63 save_PKG_CONFIG="$PKG_CONFIG"
13.64 PKG_CONFIG="$PKG_CONFIG --static"
13.65 PKG_CHECK_MODULES(SETUP,[whelk])
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/plover-gtk/Makefile.am Sat Feb 20 12:11:02 2010 +0000
14.3 @@ -0,0 +1,15 @@
14.4 +AM_CFLAGS=-g $(PLOVER_GTK_CFLAGS)
14.5 +LIBS=$(PLOVER_GTK_LIBS)
14.6 +INCLUDES=-I$(top_srcdir)
14.7 +LDFLAGS=-no-undefined -version-info $(PLOVER_GTK_LT_VERSION_INFO)
14.8 +
14.9 +pkginclude_HEADERS=error.h package.h packageset.h packagestore.h \
14.10 + packagefilestore.h
14.11 +
14.12 +lib_LTLIBRARIES=libplover-gtk.la
14.13 +libplover_gtk_la_SOURCES=$(pkginclude_HEADERS) \
14.14 + error.c package.c packageset.c packagestore.c \
14.15 + packagefilestore.c
14.16 +
14.17 +pkgconfigdir=$(libdir)/pkgconfig
14.18 +pkgconfig_DATA=plover-gtk.pc
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/plover-gtk/error.c Sat Feb 20 12:11:02 2010 +0000
15.3 @@ -0,0 +1,30 @@
15.4 +/*
15.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
15.6 + *
15.7 + * This program is free software; you can redistribute it and/or modify
15.8 + * it under the terms of the GNU General Public License as published by
15.9 + * the Free Software Foundation; either version 2 of the License, or
15.10 + * (at your option) any later version.
15.11 + *
15.12 + * This program is distributed in the hope that it will be useful,
15.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15.15 + * GNU General Public License for more details.
15.16 + *
15.17 + * You should have received a copy of the GNU General Public License along
15.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
15.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15.20 + */
15.21 +
15.22 +#include "config.h"
15.23 +#include <stdlib.h>
15.24 +#include <glib.h>
15.25 +
15.26 +GQuark plover_razor_error_quark(void)
15.27 +{
15.28 + static GQuark quark=0;
15.29 + if (!quark)
15.30 + quark=g_quark_from_static_string("plover-razor-error-quark");
15.31 + return quark;
15.32 +}
15.33 +
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/plover-gtk/error.h Sat Feb 20 12:11:02 2010 +0000
16.3 @@ -0,0 +1,11 @@
16.4 +#ifndef __PLOVER_ERROR_H__
16.5 +#define __PLOVER_ERROR_H__
16.6 +
16.7 +#define PLOVER_RAZOR_ERROR plover_razor_error_quark()
16.8 +
16.9 +typedef enum {
16.10 + PLOVER_RAZOR_ERROR_FAILED
16.11 +} PloverRazorError;
16.12 +
16.13 +#endif /* __PLOVER_ERROR_H__ */
16.14 +
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/plover-gtk/package.c Sat Feb 20 12:11:02 2010 +0000
17.3 @@ -0,0 +1,179 @@
17.4 +/*
17.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
17.6 + *
17.7 + * This program is free software; you can redistribute it and/or modify
17.8 + * it under the terms of the GNU General Public License as published by
17.9 + * the Free Software Foundation; either version 2 of the License, or
17.10 + * (at your option) any later version.
17.11 + *
17.12 + * This program is distributed in the hope that it will be useful,
17.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
17.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17.15 + * GNU General Public License for more details.
17.16 + *
17.17 + * You should have received a copy of the GNU General Public License along
17.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
17.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17.20 + */
17.21 +
17.22 +#include "config.h"
17.23 +#include <stdlib.h>
17.24 +#include <string.h>
17.25 +#include <glib-object.h>
17.26 +#include <razor.h>
17.27 +#include "plover-gtk/package.h"
17.28 +
17.29 +G_DEFINE_TYPE(PloverPackage,plover_package,G_TYPE_OBJECT);
17.30 +
17.31 +typedef struct _PloverPackagePrivate {
17.32 + struct razor_set *set;
17.33 + struct razor_package *pkg;
17.34 + PloverPackageFileStore *file_store;
17.35 +} PloverPackagePrivate;
17.36 +
17.37 +#define PLOVER_PACKAGE_GET_PRIVATE(obj)\
17.38 + G_TYPE_INSTANCE_GET_PRIVATE(obj,\
17.39 + PLOVER_TYPE_PACKAGE,PloverPackagePrivate)
17.40 +
17.41 +enum {
17.42 + CHANGED=0,
17.43 + N_SIGNALS
17.44 +};
17.45 +
17.46 +static guint signals[N_SIGNALS];
17.47 +
17.48 +static void plover_package_dispose(GObject *obj)
17.49 +{
17.50 + PloverPackagePrivate *priv=PLOVER_PACKAGE_GET_PRIVATE(obj);
17.51 + if (priv->file_store)
17.52 + {
17.53 + g_object_unref(priv->file_store);
17.54 + priv->file_store=NULL;
17.55 + }
17.56 + if (G_OBJECT_CLASS(plover_package_parent_class)->dispose)
17.57 + G_OBJECT_CLASS(plover_package_parent_class)->dispose(obj);
17.58 +}
17.59 +
17.60 +static void plover_package_class_init(PloverPackageClass *klass)
17.61 +{
17.62 + GObjectClass *oclass=G_OBJECT_CLASS(klass);
17.63 + oclass->dispose=plover_package_dispose;
17.64 + g_type_class_add_private(klass,sizeof(PloverPackagePrivate));
17.65 + signals[CHANGED]=g_signal_newv("changed",
17.66 + G_TYPE_FROM_CLASS(klass),G_SIGNAL_RUN_LAST,NULL,NULL,NULL,
17.67 + g_cclosure_marshal_VOID__VOID,G_TYPE_NONE,0,NULL);
17.68 +}
17.69 +
17.70 +static void plover_package_init(PloverPackage *package)
17.71 +{
17.72 +}
17.73 +
17.74 +PloverPackage *plover_package_new(struct razor_set *set,
17.75 + struct razor_package *pkg)
17.76 +{
17.77 + PloverPackage *package;
17.78 + PloverPackagePrivate *priv;
17.79 + package=g_object_new(PLOVER_TYPE_PACKAGE,NULL);
17.80 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.81 + priv->set=set;
17.82 + priv->pkg=pkg;
17.83 + return package;
17.84 +}
17.85 +
17.86 +const char *plover_package_get_name(PloverPackage *package)
17.87 +{
17.88 + PloverPackagePrivate *priv;
17.89 + const char *name;
17.90 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.91 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.92 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_NAME,&name,
17.93 + RAZOR_DETAIL_LAST);
17.94 + return name;
17.95 +}
17.96 +
17.97 +const char *plover_package_get_summary(PloverPackage *package)
17.98 +{
17.99 + PloverPackagePrivate *priv;
17.100 + const char *summary;
17.101 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.102 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.103 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_SUMMARY,&summary,
17.104 + RAZOR_DETAIL_LAST);
17.105 + return summary;
17.106 +}
17.107 +
17.108 +const char *plover_package_get_version(PloverPackage *package)
17.109 +{
17.110 + PloverPackagePrivate *priv;
17.111 + const char *version;
17.112 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.113 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.114 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_VERSION,&version,
17.115 + RAZOR_DETAIL_LAST);
17.116 + return version;
17.117 +}
17.118 +
17.119 +const char *plover_package_get_license(PloverPackage *package)
17.120 +{
17.121 + PloverPackagePrivate *priv;
17.122 + const char *license;
17.123 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.124 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.125 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_LICENSE,&license,
17.126 + RAZOR_DETAIL_LAST);
17.127 + return license;
17.128 +}
17.129 +
17.130 +const char *plover_package_get_arch(PloverPackage *package)
17.131 +{
17.132 + PloverPackagePrivate *priv;
17.133 + const char *arch;
17.134 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.135 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.136 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_ARCH,&arch,
17.137 + RAZOR_DETAIL_LAST);
17.138 + return arch;
17.139 +}
17.140 +
17.141 +const char *plover_package_get_description(PloverPackage *package)
17.142 +{
17.143 + PloverPackagePrivate *priv;
17.144 + const char *description;
17.145 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.146 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.147 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_DESCRIPTION,
17.148 + &description,RAZOR_DETAIL_LAST);
17.149 + return description;
17.150 +}
17.151 +
17.152 +const char *plover_package_get_URL(PloverPackage *package)
17.153 +{
17.154 + PloverPackagePrivate *priv;
17.155 + const char *URL;
17.156 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.157 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.158 + razor_package_get_details(priv->set,priv->pkg,RAZOR_DETAIL_URL,&URL,
17.159 + RAZOR_DETAIL_LAST);
17.160 + return URL;
17.161 +}
17.162 +
17.163 +GdkPixbuf *plover_package_get_icon(PloverPackage *package)
17.164 +{
17.165 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.166 + return NULL;
17.167 +}
17.168 +
17.169 +PloverPackageFileStore *plover_package_get_file_store(PloverPackage *package)
17.170 +{
17.171 + PloverPackagePrivate *priv;
17.172 + struct razor_file_iterator *iter;
17.173 + g_return_val_if_fail(PLOVER_IS_PACKAGE(package),NULL);
17.174 + priv=PLOVER_PACKAGE_GET_PRIVATE(package);
17.175 + if (!priv->file_store)
17.176 + {
17.177 + iter=razor_file_iterator_create(priv->set,priv->pkg,0);
17.178 + priv->file_store=plover_package_file_store_new(iter);
17.179 + razor_file_iterator_destroy(iter);
17.180 + }
17.181 + return priv->file_store;
17.182 +}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/plover-gtk/package.h Sat Feb 20 12:11:02 2010 +0000
18.3 @@ -0,0 +1,50 @@
18.4 +#ifndef __PLOVER_PACKAGE_H__
18.5 +#define __PLOVER_PACKAGE_H__
18.6 +
18.7 +#include <razor.h>
18.8 +#include <glib-object.h>
18.9 +#include <gdk-pixbuf/gdk-pixbuf.h>
18.10 +#include <plover-gtk/packageset.h>
18.11 +#include <plover-gtk/packagefilestore.h>
18.12 +
18.13 +G_BEGIN_DECLS
18.14 +
18.15 +#define PLOVER_TYPE_PACKAGE plover_package_get_type()
18.16 +#define PLOVER_PACKAGE(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\
18.17 + PLOVER_TYPE_PACKAGE,PloverPackage)
18.18 +#define PLOVER_PACKAGE_CLASS(klass)\
18.19 + G_TYPE_CHECK_CLASS_CAST(klass,\
18.20 + PLOVER_TYPE_PACKAGE,PloverPackageClass)
18.21 +#define PLOVER_IS_PACKAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj,\
18.22 + PLOVER_TYPE_PACKAGE)
18.23 +#define PLOVER_IS_PACKAGE_CLASS(klass)\
18.24 + G_TYPE_CHECK_CLASS_TYPE(obj,\
18.25 + PLOVER_TYPE_PACKAGE)
18.26 +#define PLOVER_PACKAGE_GET_CLASS(obj)\
18.27 + G_TYPE_INSTANCE_GET_CLASS(obj,\
18.28 + PLOVER_TYPE_PACKAGE,PloverPackageClass)
18.29 +
18.30 +typedef struct _PloverPackage {
18.31 + GObject parent_instance;
18.32 +} PloverPackage;
18.33 +
18.34 +typedef struct _PloverPackageClass {
18.35 + GObjectClass parent_class;
18.36 +} PloverPackageClass;
18.37 +
18.38 +GType plover_package_get_type(void) G_GNUC_CONST;
18.39 +PloverPackage *plover_package_new(struct razor_set *set,
18.40 + struct razor_package *pkg);
18.41 +const char *plover_package_get_name(PloverPackage *package);
18.42 +const char *plover_package_get_summary(PloverPackage *package);
18.43 +const char *plover_package_get_version(PloverPackage *package);
18.44 +const char *plover_package_get_license(PloverPackage *package);
18.45 +const char *plover_package_get_arch(PloverPackage *package);
18.46 +const char *plover_package_get_description(PloverPackage *package);
18.47 +const char *plover_package_get_URL(PloverPackage *package);
18.48 +GdkPixbuf *plover_package_get_icon(PloverPackage *package);
18.49 +PloverPackageFileStore *plover_package_get_file_store(PloverPackage *package);
18.50 +
18.51 +G_END_DECLS
18.52 +
18.53 +#endif /* __PLOVER_PACKAGE_H__ */
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/plover-gtk/packagefilestore.c Sat Feb 20 12:11:02 2010 +0000
19.3 @@ -0,0 +1,254 @@
19.4 +/*
19.5 + * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
19.6 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
19.7 + *
19.8 + * This program is free software; you can redistribute it and/or modify
19.9 + * it under the terms of the GNU General Public License as published by
19.10 + * the Free Software Foundation; either version 2 of the License, or
19.11 + * (at your option) any later version.
19.12 + *
19.13 + * This program is distributed in the hope that it will be useful,
19.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
19.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19.16 + * GNU General Public License for more details.
19.17 + *
19.18 + * You should have received a copy of the GNU General Public License along
19.19 + * with this program; if not, write to the Free Software Foundation, Inc.,
19.20 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19.21 + */
19.22 +
19.23 +#include "config.h"
19.24 +#include <stdlib.h>
19.25 +#include <string.h>
19.26 +#include <glib-object.h>
19.27 +#include <gtk/gtk.h>
19.28 +#include "plover-gtk/packagefilestore.h"
19.29 +
19.30 +#define VALID_ITER(iter,store) ((iter) && (iter)->user_data && \
19.31 + PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(store)->stamp==(iter)->stamp && \
19.32 + !g_sequence_iter_is_end((iter)->user_data) && \
19.33 + g_sequence_iter_get_sequence((iter)->user_data)== \
19.34 + PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(store)->seq)
19.35 +
19.36 +static GType column_types[PLOVER_PACKAGE_FILE_STORE_NO_COLUMNS];
19.37 +
19.38 +static void plover_package_file_store_tree_model_init(GtkTreeModelIface *iface);
19.39 +
19.40 +G_DEFINE_TYPE_WITH_CODE(PloverPackageFileStore,plover_package_file_store,
19.41 + G_TYPE_OBJECT,G_IMPLEMENT_INTERFACE(GTK_TYPE_TREE_MODEL,
19.42 + plover_package_file_store_tree_model_init));
19.43 +
19.44 +typedef struct _PloverPackageFileStorePrivate {
19.45 + GSequence *seq;
19.46 + int stamp;
19.47 +} PloverPackageFileStorePrivate;
19.48 +
19.49 +#define PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(obj)\
19.50 + G_TYPE_INSTANCE_GET_PRIVATE(obj,\
19.51 + PLOVER_TYPE_PACKAGE_FILE_STORE,\
19.52 + PloverPackageFileStorePrivate)
19.53 +
19.54 +static void plover_package_file_store_finalize(GObject *obj)
19.55 +{
19.56 + PloverPackageFileStorePrivate *priv=
19.57 + PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(obj);
19.58 + g_sequence_free(priv->seq);
19.59 + if (G_OBJECT_CLASS(plover_package_file_store_parent_class)->finalize)
19.60 + G_OBJECT_CLASS(plover_package_file_store_parent_class)->finalize(obj);
19.61 +}
19.62 +
19.63 +static void
19.64 + plover_package_file_store_class_init(PloverPackageFileStoreClass *klass)
19.65 +{
19.66 + GObjectClass *oclass=G_OBJECT_CLASS(klass);
19.67 + oclass->finalize=plover_package_file_store_finalize;
19.68 + g_type_class_add_private(klass,sizeof(PloverPackageFileStorePrivate));
19.69 + column_types[PLOVER_PACKAGE_FILE_STORE_NAME_COLUMN]=G_TYPE_STRING;
19.70 +}
19.71 +
19.72 +static GtkTreeModelFlags
19.73 +plover_package_file_store_get_flags(GtkTreeModel *tree_model)
19.74 +{
19.75 + return GTK_TREE_MODEL_ITERS_PERSIST|GTK_TREE_MODEL_LIST_ONLY;
19.76 +}
19.77 +
19.78 +static gint plover_package_file_store_get_n_columns(GtkTreeModel *tree_model)
19.79 +{
19.80 + return PLOVER_PACKAGE_FILE_STORE_NO_COLUMNS;
19.81 +}
19.82 +
19.83 +static GType
19.84 + plover_package_file_store_get_column_type(GtkTreeModel *tree_model,gint indx)
19.85 +{
19.86 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.87 + g_return_val_if_fail(indx>=0 && indx<PLOVER_PACKAGE_FILE_STORE_NO_COLUMNS,
19.88 + G_TYPE_INVALID);
19.89 + return column_types[indx];
19.90 +}
19.91 +
19.92 +static gboolean plover_package_file_store_get_iter(GtkTreeModel *tree_model,
19.93 + GtkTreeIter *iter,GtkTreePath *path)
19.94 +{
19.95 + int i;
19.96 + PloverPackageFileStorePrivate *priv;
19.97 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.98 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(store);
19.99 + i=gtk_tree_path_get_indices(path)[0];
19.100 + if (i>=g_sequence_get_length(priv->seq))
19.101 + return FALSE;
19.102 + iter->stamp=priv->stamp;
19.103 + iter->user_data=g_sequence_get_iter_at_pos(priv->seq,i);
19.104 + return TRUE;
19.105 +}
19.106 +
19.107 +static GtkTreePath *
19.108 + plover_package_file_store_get_path(GtkTreeModel *tree_model,GtkTreeIter *iter)
19.109 +{
19.110 + GtkTreePath *path;
19.111 + g_return_val_if_fail(VALID_ITER(iter,tree_model),NULL);
19.112 + if (g_sequence_iter_is_end(iter->user_data))
19.113 + return NULL;
19.114 + path=gtk_tree_path_new();
19.115 + gtk_tree_path_append_index(path,
19.116 + g_sequence_iter_get_position(iter->user_data));
19.117 + return path;
19.118 +}
19.119 +
19.120 +static void plover_package_file_store_get_value(GtkTreeModel *tree_model,
19.121 + GtkTreeIter *iter,gint column,GValue *value)
19.122 +{
19.123 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.124 + char *name;
19.125 + g_return_if_fail(column>=0 && column<PLOVER_PACKAGE_FILE_STORE_NO_COLUMNS);
19.126 + g_return_if_fail(VALID_ITER(iter,store));
19.127 + name=g_sequence_get(iter->user_data);
19.128 + g_value_init(value,column_types[column]);
19.129 + switch((PloverPackageFileStoreColumn)column)
19.130 + {
19.131 + case PLOVER_PACKAGE_FILE_STORE_NAME_COLUMN:
19.132 + g_value_set_string(value,name);
19.133 + break;
19.134 + }
19.135 +}
19.136 +
19.137 +static gboolean plover_package_file_store_iter_next(GtkTreeModel *tree_model,
19.138 + GtkTreeIter *iter)
19.139 +{
19.140 + g_return_val_if_fail(VALID_ITER(iter,tree_model),FALSE);
19.141 + iter->user_data=g_sequence_iter_next(iter->user_data);
19.142 + return !g_sequence_iter_is_end(iter->user_data);
19.143 +}
19.144 +
19.145 +static gboolean
19.146 + plover_package_file_store_iter_children(GtkTreeModel *tree_model,
19.147 + GtkTreeIter *iter,GtkTreeIter *parent)
19.148 +{
19.149 + PloverPackageFileStorePrivate *priv;
19.150 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.151 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(tree_model);
19.152 + /* this is a list, nodes have no children */
19.153 + if (parent)
19.154 + return FALSE;
19.155 + if (g_sequence_get_length(priv->seq)>0)
19.156 + {
19.157 + iter->stamp=priv->stamp;
19.158 + iter->user_data=g_sequence_get_begin_iter(priv->seq);
19.159 + return TRUE;
19.160 + }
19.161 + else
19.162 + return FALSE;
19.163 +}
19.164 +
19.165 +static gboolean
19.166 + plover_package_file_store_iter_has_child(GtkTreeModel *tree_model,
19.167 + GtkTreeIter *iter)
19.168 +{
19.169 + return FALSE;
19.170 +}
19.171 +
19.172 +static gint plover_package_file_store_iter_n_children(GtkTreeModel *tree_model,
19.173 + GtkTreeIter *iter)
19.174 +{
19.175 + PloverPackageFileStorePrivate *priv;
19.176 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.177 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(tree_model);
19.178 + if (!iter)
19.179 + return g_sequence_get_length(priv->seq);
19.180 + g_return_val_if_fail(VALID_ITER(iter,tree_model),-1);
19.181 + return 0;
19.182 +}
19.183 +
19.184 +static gboolean
19.185 + plover_package_file_store_iter_nth_child(GtkTreeModel *tree_model,
19.186 + GtkTreeIter *iter,GtkTreeIter *parent,gint n)
19.187 +{
19.188 + PloverPackageFileStorePrivate *priv;
19.189 + PloverPackageFileStore *store=(PloverPackageFileStore *)tree_model;
19.190 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(tree_model);
19.191 + GSequenceIter *child;
19.192 + if (parent)
19.193 + return FALSE;
19.194 + child=g_sequence_get_iter_at_pos(priv->seq,n);
19.195 + if (g_sequence_iter_is_end(child))
19.196 + return FALSE;
19.197 + iter->stamp=priv->stamp;
19.198 + iter->user_data=child;
19.199 + return TRUE;
19.200 +}
19.201 +
19.202 +static gboolean plover_package_file_store_iter_parent(GtkTreeModel *tree_model,
19.203 + GtkTreeIter *iter,GtkTreeIter *child)
19.204 +{
19.205 + return FALSE;
19.206 +}
19.207 +
19.208 +static void plover_package_file_store_tree_model_init(GtkTreeModelIface *iface)
19.209 +{
19.210 + iface->get_flags=plover_package_file_store_get_flags;
19.211 + iface->get_n_columns=plover_package_file_store_get_n_columns;
19.212 + iface->get_column_type=plover_package_file_store_get_column_type;
19.213 + iface->get_iter=plover_package_file_store_get_iter;
19.214 + iface->get_path=plover_package_file_store_get_path;
19.215 + iface->get_value=plover_package_file_store_get_value;
19.216 + iface->iter_next=plover_package_file_store_iter_next;
19.217 + iface->iter_children=plover_package_file_store_iter_children;
19.218 + iface->iter_has_child=plover_package_file_store_iter_has_child;
19.219 + iface->iter_n_children=plover_package_file_store_iter_n_children;
19.220 + iface->iter_nth_child=plover_package_file_store_iter_nth_child;
19.221 + iface->iter_parent=plover_package_file_store_iter_parent;
19.222 +}
19.223 +
19.224 +static void plover_package_file_store_init(PloverPackageFileStore *store)
19.225 +{
19.226 + PloverPackageFileStorePrivate *priv;
19.227 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(store);
19.228 + priv->seq=g_sequence_new(g_free);
19.229 + priv->stamp=g_random_int();
19.230 +}
19.231 +
19.232 +PloverPackageFileStore *
19.233 + plover_package_file_store_new(struct razor_file_iterator *files)
19.234 +{
19.235 + const char *name;
19.236 + GSequenceIter *si;
19.237 + GtkTreeIter ti;
19.238 + GtkTreePath *path;
19.239 + gint *indices;
19.240 + PloverPackageFileStore *store;
19.241 + PloverPackageFileStorePrivate *priv;
19.242 + store=g_object_new(PLOVER_TYPE_PACKAGE_FILE_STORE,NULL);
19.243 + priv=PLOVER_PACKAGE_FILE_STORE_GET_PRIVATE(store);
19.244 + path=gtk_tree_path_new();
19.245 + gtk_tree_path_append_index(path,0);
19.246 + indices=gtk_tree_path_get_indices(path);
19.247 + while(razor_file_iterator_next(files,&name))
19.248 + {
19.249 + si=g_sequence_insert_sorted(priv->seq,g_strdup(name),g_strcmp0,NULL);
19.250 + *indices=g_sequence_iter_get_position(si);
19.251 + ti.stamp=priv->stamp;
19.252 + ti.user_data=si;
19.253 + gtk_tree_model_row_inserted(GTK_TREE_MODEL(store),path,&ti);
19.254 + }
19.255 + gtk_tree_path_free(path);
19.256 + return store;
19.257 +}
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/plover-gtk/packagefilestore.h Sat Feb 20 12:11:02 2010 +0000
20.3 @@ -0,0 +1,50 @@
20.4 +#ifndef __PLOVER_PACKAGE_FILE_STORE_H__
20.5 +#define __PLOVER_PACKAGE_FILE_STORE_H__
20.6 +
20.7 +#include <glib-object.h>
20.8 +#include <razor.h>
20.9 +
20.10 +G_BEGIN_DECLS
20.11 +
20.12 +#define PLOVER_TYPE_PACKAGE_FILE_STORE\
20.13 + plover_package_file_store_get_type()
20.14 +#define PLOVER_PACKAGE_FILE_STORE(obj)\
20.15 + G_TYPE_CHECK_INSTANCE_CAST(obj,\
20.16 + PLOVER_TYPE_PACKAGE_FILE_STORE,\
20.17 + PloverPackageFileStore)
20.18 +#define PLOVER_PACKAGE_FILE_STORE_CLASS(klass)\
20.19 + G_TYPE_CHECK_CLASS_CAST(klass,\
20.20 + PLOVER_TYPE_PACKAGE_FILE_STORE,\
20.21 + PloverPackageFileStoreClass)
20.22 +#define PLOVER_IS_PACKAGE_FILE_STORE(obj)\
20.23 + G_TYPE_CHECK_INSTANCE_TYPE(obj,\
20.24 + PLOVER_TYPE_PACKAGE_FILE_STORE)
20.25 +#define PLOVER_IS_PACKAGE_FILE_STORE_CLASS(klass)\
20.26 + G_TYPE_CHECK_CLASS_TYPE(obj,\
20.27 + PLOVER_TYPE_PACKAGE_FILE_STORE)
20.28 +#define PLOVER_PACKAGE_FILE_STORE_GET_CLASS(obj)\
20.29 + G_TYPE_INSTANCE_GET_CLASS(obj,\
20.30 + PLOVER_TYPE_PACKAGE_FILE_STORE,\
20.31 + PloverPackageFileStoreClass)
20.32 +
20.33 +typedef enum
20.34 +{
20.35 + PLOVER_PACKAGE_FILE_STORE_NAME_COLUMN,
20.36 + PLOVER_PACKAGE_FILE_STORE_NO_COLUMNS
20.37 +} PloverPackageFileStoreColumn;
20.38 +
20.39 +typedef struct _PloverPackageFileStore {
20.40 + GObject parent_instance;
20.41 +} PloverPackageFileStore;
20.42 +
20.43 +typedef struct _PloverPackageFileStoreClass {
20.44 + GObjectClass parent_class;
20.45 +} PloverPackageFileStoreClass;
20.46 +
20.47 +GType plover_package_file_store_get_type(void) G_GNUC_CONST;
20.48 +PloverPackageFileStore *
20.49 + plover_package_file_store_new(struct razor_file_iterator *files);
20.50 +
20.51 +G_END_DECLS
20.52 +
20.53 +#endif /* __PLOVER_PACKAGE_FILE_STORE_H__ */
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/plover-gtk/packageset.c Sat Feb 20 12:11:02 2010 +0000
21.3 @@ -0,0 +1,171 @@
21.4 +/*
21.5 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
21.6 + *
21.7 + * This program is free software; you can redistribute it and/or modify
21.8 + * it under the terms of the GNU General Public License as published by
21.9 + * the Free Software Foundation; either version 2 of the License, or
21.10 + * (at your option) any later version.
21.11 + *
21.12 + * This program is distributed in the hope that it will be useful,
21.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21.15 + * GNU General Public License for more details.
21.16 + *
21.17 + * You should have received a copy of the GNU General Public License along
21.18 + * with this program; if not, write to the Free Software Foundation, Inc.,
21.19 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21.20 + */
21.21 +
21.22 +#include "config.h"
21.23 +#include <stdlib.h>
21.24 +#include <string.h>
21.25 +#include <fcntl.h>
21.26 +#include <errno.h>
21.27 +#include <glib-object.h>
21.28 +#include <razor.h>
21.29 +#include "plover/plover.h"
21.30 +#include "plover-gtk/error.h"
21.31 +#include "plover-gtk/packageset.h"
21.32 +#include "plover-gtk/package.h"
21.33 +
21.34 +G_DEFINE_TYPE(PloverPackageSet,plover_package_set,G_TYPE_OBJECT);
21.35 +
21.36 +typedef struct _PloverPackageSetPrivate {
21.37 + struct razor_root *root;
21.38 + struct razor_set *set;
21.39 + GSList *packages;
21.40 +} PloverPackageSetPrivate;
21.41 +
21.42 +#define PLOVER_PACKAGE_SET_GET_PRIVATE(obj)\
21.43 + G_TYPE_INSTANCE_GET_PRIVATE(obj,\
21.44 + PLOVER_TYPE_PACKAGE_SET,\
21.45 + PloverPackageSetPrivate)
21.46 +
21.47 +enum {
21.48 + CHANGED=0,
21.49 + N_SIGNALS
21.50 +};
21.51 +
21.52 +static guint signals[N_SIGNALS];
21.53 +
21.54 +static void plover_package_set_finalize(GObject *obj)
21.55 +{
21.56 + PloverPackageSetPrivate *priv=PLOVER_PACKAGE_SET_GET_PRIVATE(obj);
21.57 + if (priv->root)
21.58 + {
21.59 + /* priv->set, if set, is owned by priv->root and should not
21.60 + * be destroyed.
21.61 + */
21.62 + razor_root_close(priv->root);
21.63 + }
21.64 + else if (priv->set)
21.65 + razor_set_destroy(priv->set);
21.66 + if (G_OBJECT_CLASS(plover_package_set_parent_class)->finalize)
21.67 + G_OBJECT_CLASS(plover_package_set_parent_class)->finalize(obj);
21.68 +}
21.69 +
21.70 +static void plover_package_set_dispose(GObject *obj)
21.71 +{
21.72 + PloverPackageSetPrivate *priv=PLOVER_PACKAGE_SET_GET_PRIVATE(obj);
21.73 + if (G_OBJECT_CLASS(plover_package_set_parent_class)->dispose)
21.74 + G_OBJECT_CLASS(plover_package_set_parent_class)->dispose(obj);
21.75 +}
21.76 +
21.77 +static void plover_package_set_class_init(PloverPackageSetClass *klass)
21.78 +{
21.79 + GObjectClass *oclass=G_OBJECT_CLASS(klass);
21.80 + oclass->finalize=plover_package_set_finalize;
21.81 + oclass->dispose=plover_package_set_dispose;
21.82 + g_type_class_add_private(klass,sizeof(PloverPackageSetPrivate));
21.83 + signals[CHANGED]=g_signal_newv("changed",
21.84 + G_TYPE_FROM_CLASS(klass),G_SIGNAL_RUN_LAST,NULL,NULL,NULL,
21.85 + g_cclosure_marshal_VOID__VOID,G_TYPE_NONE,0,NULL);
21.86 +}
21.87 +
21.88 +static void plover_package_set_init(PloverPackageSet *set)
21.89 +{
21.90 +}
21.91 +
21.92 +PloverPackageSet *plover_package_set_new(void)
21.93 +{
21.94 + return g_object_new(PLOVER_TYPE_PACKAGE_SET,NULL);
21.95 +}
21.96 +
21.97 +PloverPackageSet *plover_package_set_new_from_installed(const char *root,
21.98 + GError **err)
21.99 +{
21.100 + PloverPackageSet *set;
21.101 + PloverPackageSetPrivate *priv;
21.102 + set=plover_package_set_new();
21.103 + priv=PLOVER_PACKAGE_SET_GET_PRIVATE(set);
21.104 + priv->root=razor_root_open(root);
21.105 + if (!priv->root)
21.106 + {
21.107 + g_set_error(err,PLOVER_RAZOR_ERROR,PLOVER_RAZOR_ERROR_FAILED,
21.108 + "Failed to open %s as razor root",root);
21.109 + g_object_unref(set);
21.110 + return NULL;
21.111 + }
21.112 + priv->set=razor_root_get_system_set(priv->root);
21.113 + if (!priv->set)
21.114 + {
21.115 + g_set_error(err,PLOVER_RAZOR_ERROR,PLOVER_RAZOR_ERROR_FAILED,
21.116 + "Failed to get system set from %s",root);
21.117 + g_object_unref(set);
21.118 + return NULL;
21.119 + }
21.120 + return set;
21.121 +}
21.122 +
21.123 +PloverPackageSet *plover_package_set_new_from_repository(const char *base,
21.124 + GError **err)
21.125 +{
21.126 + int fd;
21.127 + gchar *s;
21.128 + PloverPackageSet *set;
21.129 + PloverPackageSetPrivate *priv;
21.130 + set=plover_package_set_new();
21.131 + priv=PLOVER_PACKAGE_SET_GET_PRIVATE(set);
21.132 + fd=open(".",O_RDONLY);
21.133 + s=g_build_filename(base,"repodata",NULL);
21.134 + if (chdir(s)<0)
21.135 + {
21.136 + g_set_error(err,G_FILE_ERROR,g_file_error_from_errno(errno),
21.137 + "%s: %s",s,g_strerror(errno));
21.138 + g_object_unref(set);
21.139 + return NULL;
21.140 + }
21.141 + g_free(s);
21.142 + priv->set=plover_razor_set_create_from_yum("..");
21.143 + fchdir(fd);
21.144 + close(fd);
21.145 + if (!priv->set)
21.146 + {
21.147 + g_set_error(err,PLOVER_RAZOR_ERROR,PLOVER_RAZOR_ERROR_FAILED,
21.148 + "Failed to create package set from repository %s",base);
21.149 + g_object_unref(set);
21.150 + return NULL;
21.151 + }
21.152 + return set;
21.153 +}
21.154 +
21.155 +GSList *plover_package_set_get_packages(PloverPackageSet *set)
21.156 +{
21.157 + struct razor_package_iterator *iter;
21.158 + struct razor_package *pkg;
21.159 + PloverPackageSetPrivate *priv;
21.160 + PloverPackage *package;
21.161 + g_return_val_if_fail(PLOVER_IS_PACKAGE_SET(set),NULL);
21.162 + priv=PLOVER_PACKAGE_SET_GET_PRIVATE(set);
21.163 + if (priv->set && !priv->packages)
21.164 + {
21.165 + iter=razor_package_iterator_create(priv->set);
21.166 + while(razor_package_iterator_next(iter,&pkg,RAZOR_DETAIL_LAST))
21.167 + {
21.168 + package=plover_package_new(priv->set,pkg);
21.169 + priv->packages=g_slist_prepend(priv->packages,package);
21.170 + }
21.171 + razor_package_iterator_destroy(iter);
21.172 + }
21.173 + return priv->packages;
21.174 +}
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/plover-gtk/packageset.h Sat Feb 20 12:11:02 2010 +0000
22.3 @@ -0,0 +1,44 @@
22.4 +#ifndef __PLOVER_PACKAGE_SET_H__
22.5 +#define __PLOVER_PACKAGE_SET_H__
22.6 +
22.7 +#include <glib-object.h>
22.8 +
22.9 +G_BEGIN_DECLS
22.10 +
22.11 +#define PLOVER_TYPE_PACKAGE_SET plover_package_set_get_type()
22.12 +#define PLOVER_PACKAGE_SET(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\
22.13 + PLOVER_TYPE_PACKAGE_SET,PloverPackageSet)
22.14 +#define PLOVER_PACKAGE_SET_CLASS(klass)\
22.15 + G_TYPE_CHECK_CLASS_CAST(klass,\
22.16 + PLOVER_TYPE_PACKAGE_SET,\
22.17 + PloverPackageSetClass)
22.18 +#define PLOVER_IS_PACKAGE_SET(obj)\
22.19 + G_TYPE_CHECK_INSTANCE_TYPE(obj,\
22.20 + PLOVER_TYPE_PACKAGE_SET)
22.21 +#define PLOVER_IS_PACKAGE_SET_CLASS(klass)\
22.22 + G_TYPE_CHECK_CLASS_TYPE(obj,\
22.23 + PLOVER_TYPE_PACKAGE_SET)
22.24 +#define PLOVER_PACKAGE_SET_GET_CLASS(obj)\
22.25 + G_TYPE_INSTANCE_GET_CLASS(obj,\
22.26 + PLOVER_TYPE_PACKAGE_SET,\
22.27 + PloverPackageSetClass)
22.28 +
22.29 +typedef struct _PloverPackageSet {
22.30 + GObject parent_instance;
22.31 +} PloverPackageSet;
22.32 +
22.33 +typedef struct _PloverPackageSetClass {
22.34 + GObjectClass parent_class;
22.35 +} PloverPackageSetClass;
22.36 +
22.37 +GType plover_package_set_get_type(void) G_GNUC_CONST;
22.38 +PloverPackageSet *plover_package_set_new(void);
22.39 +PloverPackageSet *plover_package_set_new_from_installed(const char *root,
22.40 + GError **err);
22.41 +PloverPackageSet *plover_package_set_new_from_repository(const char *base,
22.42 + GError **err);
22.43 +GSList *plover_package_set_get_packages(PloverPackageSet *set);
22.44 +
22.45 +G_END_DECLS
22.46 +
22.47 +#endif /* __PLOVER_PACKAGE_SET_H__ */
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/plover-gtk/packagestore.c Sat Feb 20 12:11:02 2010 +0000
23.3 @@ -0,0 +1,356 @@
23.4 +/*
23.5 + * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
23.6 + * Copyright (C) 2010 J. Ali Harlow <ali@juiblex.co.uk>
23.7 + *
23.8 + * This program is free software; you can redistribute it and/or modify
23.9 + * it under the terms of the GNU General Public License as published by
23.10 + * the Free Software Foundation; either version 2 of the License, or
23.11 + * (at your option) any later version.
23.12 + *
23.13 + * This program is distributed in the hope that it will be useful,
23.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23.16 + * GNU General Public License for more details.
23.17 + *
23.18 + * You should have received a copy of the GNU General Public License along
23.19 + * with this program; if not, write to the Free Software Foundation, Inc.,
23.20 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23.21 + */
23.22 +
23.23 +#include "config.h"
23.24 +#include <stdlib.h>
23.25 +#include <string.h>
23.26 +#include <glib-object.h>
23.27 +#include <gtk/gtk.h>
23.28 +#include <razor.h>
23.29 +#include "plover/plover.h"
23.30 +#include "plover-gtk/package.h"
23.31 +#include "plover-gtk/packagestore.h"
23.32 +
23.33 +#define VALID_ITER(iter,store) ((iter) && (iter)->user_data && \
23.34 + PLOVER_PACKAGE_STORE_GET_PRIVATE(store)->stamp==(iter)->stamp && \
23.35 + !g_sequence_iter_is_end((iter)->user_data) && \
23.36 + g_sequence_iter_get_sequence((iter)->user_data)== \
23.37 + PLOVER_PACKAGE_STORE_GET_PRIVATE(store)->seq)
23.38 +
23.39 +static GType column_types[PLOVER_PACKAGE_STORE_NO_COLUMNS];
23.40 +
23.41 +static void plover_package_store_tree_model_init(GtkTreeModelIface *iface);
23.42 +
23.43 +G_DEFINE_TYPE_WITH_CODE(PloverPackageStore,plover_package_store,G_TYPE_OBJECT,
23.44 + G_IMPLEMENT_INTERFACE(GTK_TYPE_TREE_MODEL,
23.45 + plover_package_store_tree_model_init));
23.46 +
23.47 +typedef struct _PloverPackageStorePrivate {
23.48 + GSList *sets;
23.49 + GSequence *seq;
23.50 + int stamp;
23.51 +} PloverPackageStorePrivate;
23.52 +
23.53 +#define PLOVER_PACKAGE_STORE_GET_PRIVATE(obj)\
23.54 + G_TYPE_INSTANCE_GET_PRIVATE(obj,\
23.55 + PLOVER_TYPE_PACKAGE_STORE,\
23.56 + PloverPackageStorePrivate)
23.57 +
23.58 +static void plover_package_store_finalize(GObject *obj)
23.59 +{
23.60 + PloverPackageStorePrivate *priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(obj);
23.61 + g_sequence_free(priv->seq);
23.62 + if (G_OBJECT_CLASS(plover_package_store_parent_class)->finalize)
23.63 + G_OBJECT_CLASS(plover_package_store_parent_class)->finalize(obj);
23.64 +}
23.65 +
23.66 +static void plover_package_store_dispose(GObject *obj)
23.67 +{
23.68 + PloverPackageStorePrivate *priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(obj);
23.69 + g_slist_foreach(priv->sets,(GFunc)g_object_unref,NULL);
23.70 + g_slist_free(priv->sets);
23.71 + priv->sets=NULL;
23.72 + g_sequence_free(priv->seq);
23.73 + priv->seq=g_sequence_new(NULL);
23.74 + if (G_OBJECT_CLASS(plover_package_store_parent_class)->dispose)
23.75 + G_OBJECT_CLASS(plover_package_store_parent_class)->dispose(obj);
23.76 +}
23.77 +
23.78 +static void plover_package_store_class_init(PloverPackageStoreClass *klass)
23.79 +{
23.80 + GObjectClass *oclass=G_OBJECT_CLASS(klass);
23.81 + oclass->finalize=plover_package_store_finalize;
23.82 + oclass->dispose=plover_package_store_dispose;
23.83 + g_type_class_add_private(klass,sizeof(PloverPackageStorePrivate));
23.84 + column_types[PLOVER_PACKAGE_STORE_OBJ_COLUMN]=PLOVER_TYPE_PACKAGE;
23.85 + column_types[PLOVER_PACKAGE_STORE_INSTALLED_COLUMN]=G_TYPE_BOOLEAN;
23.86 + column_types[PLOVER_PACKAGE_STORE_ICON_COLUMN]=GDK_TYPE_PIXBUF;
23.87 + column_types[PLOVER_PACKAGE_STORE_NAME_COLUMN]=G_TYPE_STRING;
23.88 + column_types[PLOVER_PACKAGE_STORE_VERSION_COLUMN]=G_TYPE_STRING;
23.89 + column_types[PLOVER_PACKAGE_STORE_SUMMARY_COLUMN]=G_TYPE_STRING;
23.90 +}
23.91 +
23.92 +static GtkTreeModelFlags
23.93 +plover_package_store_get_flags(GtkTreeModel *tree_model)
23.94 +{
23.95 + return GTK_TREE_MODEL_ITERS_PERSIST|GTK_TREE_MODEL_LIST_ONLY;
23.96 +}
23.97 +
23.98 +static gint plover_package_store_get_n_columns(GtkTreeModel *tree_model)
23.99 +{
23.100 + return PLOVER_PACKAGE_STORE_NO_COLUMNS;
23.101 +}
23.102 +
23.103 +static GType
23.104 + plover_package_store_get_column_type(GtkTreeModel *tree_model,gint indx)
23.105 +{
23.106 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.107 + g_return_val_if_fail(indx>=0 && indx<PLOVER_PACKAGE_STORE_NO_COLUMNS,
23.108 + G_TYPE_INVALID);
23.109 + return column_types[indx];
23.110 +}
23.111 +
23.112 +static gboolean plover_package_store_get_iter(GtkTreeModel *tree_model,
23.113 + GtkTreeIter *iter,GtkTreePath *path)
23.114 +{
23.115 + int i;
23.116 + PloverPackageStorePrivate *priv;
23.117 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.118 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(store);
23.119 + i=gtk_tree_path_get_indices(path)[0];
23.120 + if (i>=g_sequence_get_length(priv->seq))
23.121 + return FALSE;
23.122 + iter->stamp=priv->stamp;
23.123 + iter->user_data=g_sequence_get_iter_at_pos(priv->seq,i);
23.124 + return TRUE;
23.125 +}
23.126 +
23.127 +static GtkTreePath *
23.128 + plover_package_store_get_path(GtkTreeModel *tree_model,GtkTreeIter *iter)
23.129 +{
23.130 + GtkTreePath *path;
23.131 + g_return_val_if_fail(VALID_ITER(iter,tree_model),NULL);
23.132 + if (g_sequence_iter_is_end(iter->user_data))
23.133 + return NULL;
23.134 + path=gtk_tree_path_new();
23.135 + gtk_tree_path_append_index(path,
23.136 + g_sequence_iter_get_position(iter->user_data));
23.137 + return path;
23.138 +}
23.139 +
23.140 +static void plover_package_store_get_value(GtkTreeModel *tree_model,
23.141 + GtkTreeIter *iter,gint column,GValue *value)
23.142 +{
23.143 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.144 + PloverPackage *package;
23.145 + g_return_if_fail(column>=0 && column<PLOVER_PACKAGE_STORE_NO_COLUMNS);
23.146 + g_return_if_fail(VALID_ITER(iter,store));
23.147 + package=g_sequence_get(iter->user_data);
23.148 + g_value_init(value,column_types[column]);
23.149 + switch((PloverPackageStoreColumn)column)
23.150 + {
23.151 + case PLOVER_PACKAGE_STORE_OBJ_COLUMN:
23.152 + g_value_set_object(value,package);
23.153 + break;
23.154 + case PLOVER_PACKAGE_STORE_INSTALLED_COLUMN:
23.155 + break;
23.156 + case PLOVER_PACKAGE_STORE_ICON_COLUMN:
23.157 + g_value_set_object(value,plover_package_get_icon(package));
23.158 + break;
23.159 + case PLOVER_PACKAGE_STORE_NAME_COLUMN:
23.160 + g_value_set_string(value,plover_package_get_name(package));
23.161 + break;
23.162 + case PLOVER_PACKAGE_STORE_VERSION_COLUMN:
23.163 + g_value_set_string(value,plover_package_get_version(package));
23.164 + break;
23.165 + case PLOVER_PACKAGE_STORE_SUMMARY_COLUMN:
23.166 + g_value_set_string(value,plover_package_get_summary(package));
23.167 + break;
23.168 + }
23.169 +}
23.170 +
23.171 +static gboolean
23.172 + plover_package_store_iter_next(GtkTreeModel *tree_model,GtkTreeIter *iter)
23.173 +{
23.174 + g_return_val_if_fail(VALID_ITER(iter,tree_model),FALSE);
23.175 + iter->user_data=g_sequence_iter_next(iter->user_data);
23.176 + return !g_sequence_iter_is_end(iter->user_data);
23.177 +}
23.178 +
23.179 +static gboolean plover_package_store_iter_children(GtkTreeModel *tree_model,
23.180 + GtkTreeIter *iter,GtkTreeIter *parent)
23.181 +{
23.182 + PloverPackageStorePrivate *priv;
23.183 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.184 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(tree_model);
23.185 + /* this is a list, nodes have no children */
23.186 + if (parent)
23.187 + return FALSE;
23.188 + if (g_sequence_get_length(priv->seq)>0)
23.189 + {
23.190 + iter->stamp=priv->stamp;
23.191 + iter->user_data=g_sequence_get_begin_iter(priv->seq);
23.192 + return TRUE;
23.193 + }
23.194 + else
23.195 + return FALSE;
23.196 +}
23.197 +
23.198 +static gboolean plover_package_store_iter_has_child(GtkTreeModel *tree_model,
23.199 + GtkTreeIter *iter)
23.200 +{
23.201 + return FALSE;
23.202 +}
23.203 +
23.204 +static gint plover_package_store_iter_n_children(GtkTreeModel *tree_model,
23.205 + GtkTreeIter *iter)
23.206 +{
23.207 + PloverPackageStorePrivate *priv;
23.208 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.209 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(tree_model);
23.210 + if (!iter)
23.211 + return g_sequence_get_length(priv->seq);
23.212 + g_return_val_if_fail(VALID_ITER(iter,tree_model),-1);
23.213 + return 0;
23.214 +}
23.215 +
23.216 +static gboolean plover_package_store_iter_nth_child(GtkTreeModel *tree_model,
23.217 + GtkTreeIter *iter,GtkTreeIter *parent,gint n)
23.218 +{
23.219 + PloverPackageStorePrivate *priv;
23.220 + PloverPackageStore *store=(PloverPackageStore *)tree_model;
23.221 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(tree_model);
23.222 + GSequenceIter *child;
23.223 + if (parent)
23.224 + return FALSE;
23.225 + child=g_sequence_get_iter_at_pos(priv->seq,n);
23.226 + if (g_sequence_iter_is_end(child))
23.227 + return FALSE;
23.228 + iter->stamp=priv->stamp;
23.229 + iter->user_data=child;
23.230 + return TRUE;
23.231 +}
23.232 +
23.233 +static gboolean plover_package_store_iter_parent(GtkTreeModel *tree_model,
23.234 + GtkTreeIter *iter,GtkTreeIter *child)
23.235 +{
23.236 + return FALSE;
23.237 +}
23.238 +
23.239 +static void plover_package_store_tree_model_init(GtkTreeModelIface *iface)
23.240 +{
23.241 + iface->get_flags=plover_package_store_get_flags;
23.242 + iface->get_n_columns=plover_package_store_get_n_columns;
23.243 + iface->get_column_type=plover_package_store_get_column_type;
23.244 + iface->get_iter=plover_package_store_get_iter;
23.245 + iface->get_path=plover_package_store_get_path;
23.246 + iface->get_value=plover_package_store_get_value;
23.247 + iface->iter_next=plover_package_store_iter_next;
23.248 + iface->iter_children=plover_package_store_iter_children;
23.249 + iface->iter_has_child=plover_package_store_iter_has_child;
23.250 + iface->iter_n_children=plover_package_store_iter_n_children;
23.251 + iface->iter_nth_child=plover_package_store_iter_nth_child;
23.252 + iface->iter_parent=plover_package_store_iter_parent;
23.253 +}
23.254 +
23.255 +static void plover_package_store_init(PloverPackageStore *store)
23.256 +{
23.257 + PloverPackageStorePrivate *priv;
23.258 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(store);
23.259 + priv->seq=g_sequence_new(NULL);
23.260 + priv->stamp=g_random_int();
23.261 +}
23.262 +
23.263 +PloverPackageStore *plover_package_store_new(void)
23.264 +{
23.265 + return g_object_new(PLOVER_TYPE_PACKAGE_STORE,NULL);
23.266 +}
23.267 +
23.268 +GSList *plover_package_store_get_sets(PloverPackageStore *store)
23.269 +{
23.270 + PloverPackageStorePrivate *priv;
23.271 + g_return_val_if_fail(PLOVER_IS_PACKAGE_STORE(store),NULL);
23.272 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(store);
23.273 + return priv->sets;
23.274 +}
23.275 +
23.276 +static gint
23.277 + plover__package_compar(gconstpointer a,gconstpointer b,gpointer user_data)
23.278 +{
23.279 + PloverPackage *pa=PLOVER_PACKAGE(a);
23.280 + PloverPackage *pb=PLOVER_PACKAGE(b);
23.281 + return strcmp(plover_package_get_name(pa),plover_package_get_name(pb));
23.282 +}
23.283 +
23.284 +void plover_package_store_add_set(PloverPackageStore *store,
23.285 + PloverPackageSet *set)
23.286 +{
23.287 + GSList *packages,*link;
23.288 + GSequenceIter *si;
23.289 + GtkTreeIter ti;
23.290 + GtkTreePath *path;
23.291 + gint *indices;
23.292 + PloverPackageStorePrivate *priv;
23.293 + g_return_if_fail(PLOVER_IS_PACKAGE_STORE(store));
23.294 + g_return_if_fail(PLOVER_IS_PACKAGE_SET(set));
23.295 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(store);
23.296 + g_return_if_fail(g_slist_find(priv->sets,set) == NULL);
23.297 + g_object_ref(set);
23.298 + path=gtk_tree_path_new();
23.299 + gtk_tree_path_append_index(path,0);
23.300 + indices=gtk_tree_path_get_indices(path);
23.301 + packages=plover_package_set_get_packages(set);
23.302 + for(link=packages;link;link=link->next)
23.303 + {
23.304 + si=g_sequence_insert_sorted(priv->seq,link->data,
23.305 + plover__package_compar,NULL);
23.306 + *indices=g_sequence_iter_get_position(si);
23.307 + ti.stamp=priv->stamp;
23.308 + ti.user_data=si;
23.309 + gtk_tree_model_row_inserted(GTK_TREE_MODEL(store),path,&ti);
23.310 + }
23.311 + gtk_tree_path_free(path);
23.312 + priv->sets=g_slist_prepend(priv->sets,set);
23.313 +}
23.314 +
23.315 +void plover_package_store_remove_set(PloverPackageStore *store,
23.316 + PloverPackageSet *set)
23.317 +{
23.318 + GSList *packages,*link;
23.319 + GSequence *seq;
23.320 + GSequenceIter *iter,*prev,*remove;
23.321 + GtkTreePath *path;
23.322 + gint *indices;
23.323 + PloverPackageStorePrivate *priv;
23.324 + g_return_if_fail(PLOVER_IS_PACKAGE_STORE(store));
23.325 + g_return_if_fail(PLOVER_IS_PACKAGE_SET(set));
23.326 + priv=PLOVER_PACKAGE_STORE_GET_PRIVATE(store);
23.327 + g_return_if_fail(g_slist_find(priv->sets,set) != NULL);
23.328 + seq=g_sequence_new(NULL);
23.329 + path=gtk_tree_path_new();
23.330 + gtk_tree_path_append_index(path,0);
23.331 + indices=gtk_tree_path_get_indices(path);
23.332 + packages=plover_package_set_get_packages(set);
23.333 + for(link=packages;link;link=link->next)
23.334 + g_sequence_insert_sorted(seq,link->data,plover__package_compar,NULL);
23.335 + prev=NULL;
23.336 + iter=g_sequence_get_begin_iter(priv->seq);
23.337 + remove=g_sequence_get_begin_iter(seq);
23.338 + while(!g_sequence_iter_is_end(iter) && !g_sequence_iter_is_end(remove))
23.339 + {
23.340 + if (g_sequence_get(iter)==g_sequence_get(remove))
23.341 + {
23.342 + *indices=g_sequence_iter_get_position(iter);
23.343 + g_sequence_remove(iter);
23.344 + remove=g_sequence_iter_next(remove);
23.345 + gtk_tree_model_row_deleted(GTK_TREE_MODEL(store),path);
23.346 + }
23.347 + else
23.348 + prev=iter;
23.349 + if (prev)
23.350 + iter=g_sequence_iter_next(prev);
23.351 + else
23.352 + iter=g_sequence_get_begin_iter(priv->seq);
23.353 + }
23.354 + gtk_tree_path_free(path);
23.355 + g_sequence_free(seq);
23.356 + priv->sets=g_slist_remove(priv->sets,set);
23.357 + g_object_unref(set);
23.358 + priv->stamp++;
23.359 +}
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/plover-gtk/packagestore.h Sat Feb 20 12:11:02 2010 +0000
24.3 @@ -0,0 +1,58 @@
24.4 +#ifndef __PLOVER_PACKAGE_STORE_H__
24.5 +#define __PLOVER_PACKAGE_STORE_H__
24.6 +
24.7 +#include <glib-object.h>
24.8 +#include <plover-gtk/packageset.h>
24.9 +
24.10 +G_BEGIN_DECLS
24.11 +
24.12 +#define PLOVER_TYPE_PACKAGE_STORE\
24.13 + plover_package_store_get_type()
24.14 +#define PLOVER_PACKAGE_STORE(obj)\
24.15 + G_TYPE_CHECK_INSTANCE_CAST(obj,\
24.16 + PLOVER_TYPE_PACKAGE_STORE,PloverPackageStore)
24.17 +#define PLOVER_PACKAGE_STORE_CLASS(klass)\
24.18 + G_TYPE_CHECK_CLASS_CAST(klass,\
24.19 + PLOVER_TYPE_PACKAGE_STORE,\
24.20 + PloverPackageStoreClass)
24.21 +#define PLOVER_IS_PACKAGE_STORE(obj)\
24.22 + G_TYPE_CHECK_INSTANCE_TYPE(obj,\
24.23 + PLOVER_TYPE_PACKAGE_STORE)
24.24 +#define PLOVER_IS_PACKAGE_STORE_CLASS(klass)\
24.25 + G_TYPE_CHECK_CLASS_TYPE(obj,\
24.26 + PLOVER_TYPE_PACKAGE_STORE)
24.27 +#define PLOVER_PACKAGE_STORE_GET_CLASS(obj)\
24.28 + G_TYPE_INSTANCE_GET_CLASS(obj,\
24.29 + PLOVER_TYPE_PACKAGE_STORE,\
24.30 + PloverPackageStoreClass)
24.31 +
24.32 +typedef enum
24.33 +{
24.34 + PLOVER_PACKAGE_STORE_OBJ_COLUMN,
24.35 + PLOVER_PACKAGE_STORE_INSTALLED_COLUMN,
24.36 + PLOVER_PACKAGE_STORE_ICON_COLUMN,
24.37 + PLOVER_PACKAGE_STORE_NAME_COLUMN,
24.38 + PLOVER_PACKAGE_STORE_VERSION_COLUMN,
24.39 + PLOVER_PACKAGE_STORE_SUMMARY_COLUMN,
24.40 + PLOVER_PACKAGE_STORE_NO_COLUMNS
24.41 +} PloverPackageStoreColumn;
24.42 +
24.43 +typedef struct _PloverPackageStore {
24.44 + GObject parent_instance;
24.45 +} PloverPackageStore;
24.46 +
24.47 +typedef struct _PloverPackageStoreClass {
24.48 + GObjectClass parent_class;
24.49 +} PloverPackageStoreClass;
24.50 +
24.51 +GType plover_package_store_get_type(void) G_GNUC_CONST;
24.52 +PloverPackageStore *plover_package_store_new(void);
24.53 +GSList *plover_package_store_get_sets(PloverPackageStore *store);
24.54 +void plover_package_store_add_set(PloverPackageStore *store,
24.55 + PloverPackageSet *set);
24.56 +void plover_package_store_remove_set(PloverPackageStore *store,
24.57 + PloverPackageSet *set);
24.58 +
24.59 +G_END_DECLS
24.60 +
24.61 +#endif /* __PLOVER_PACKAGE_STORE_H__ */
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/plover-gtk/plover-gtk.pc.in Sat Feb 20 12:11:02 2010 +0000
25.3 @@ -0,0 +1,11 @@
25.4 +prefix=@prefix@
25.5 +exec_prefix=@exec_prefix@
25.6 +libdir=@libdir@
25.7 +includedir=@includedir@
25.8 +
25.9 +Name: plover-gtk
25.10 +Description: Plover Gtk+ objects
25.11 +Version: @VERSION@
25.12 +Requires: plover gtk+-2.0
25.13 +Libs: -L${libdir} -lplover-gtk
25.14 +Cflags: -I${includedir}
26.1 --- a/plover/Makefile.am Thu Feb 11 19:47:47 2010 +0000
26.2 +++ b/plover/Makefile.am Sat Feb 20 12:11:02 2010 +0000
26.3 @@ -1,13 +1,12 @@
26.4 AM_CFLAGS=-g $(LIBPLOVER_CFLAGS)
26.5 LIBS=$(LIBPLOVER_LIBS)
26.6 INCLUDES=-I$(top_srcdir)
26.7 -LDFLAGS=-no-undefined \
26.8 - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
26.9 -
26.10 -lib_LTLIBRARIES=libplover.la
26.11 -libplover_la_SOURCES=plover.h util.c import-yum.c razor.c comps.c
26.12 +LDFLAGS=-no-undefined -version-info $(LIBPLOVER_LT_VERSION_INFO)
26.13
26.14 pkginclude_HEADERS=plover.h
26.15
26.16 +lib_LTLIBRARIES=libplover.la
26.17 +libplover_la_SOURCES=$(pkginclude_HEADERS) util.c import-yum.c razor.c comps.c
26.18 +
26.19 pkgconfigdir=$(libdir)/pkgconfig
26.20 pkgconfig_DATA=plover.pc
27.1 --- a/plover/import-yum.c Thu Feb 11 19:47:47 2010 +0000
27.2 +++ b/plover/import-yum.c Sat Feb 20 12:11:02 2010 +0000
27.3 @@ -98,6 +98,9 @@
27.4 if (strcmp(atts[i], "packages") == 0)
27.5 ctx->total = atoi(atts[i + 1]);
27.6 }
27.7 + } else if (strcmp(name, "package") == 0) {
27.8 + *ctx->name=*ctx->arch=*ctx->summary=*ctx->description='\0';
27.9 + *ctx->url=*ctx->license='\0';
27.10 } else if (strcmp(name, "name") == 0) {
27.11 ctx->state = YUM_STATE_PACKAGE_NAME;
27.12 ctx->p = ctx->name;
27.13 @@ -216,9 +219,6 @@
27.14
27.15 XML_StopParser(ctx->current_parser, XML_TRUE);
27.16 ctx->current_parser = ctx->filelists_parser;
27.17 -
27.18 - printf("\rimporting %d/%d", ++ctx->current, ctx->total);
27.19 - fflush(stdout);
27.20 }
27.21 }
27.22
27.23 @@ -360,6 +360,5 @@
27.24 gzclose(primary);
27.25 gzclose(filelists);
27.26
27.27 - printf ("\nsaving\n");
27.28 return razor_importer_finish(ctx.importer);
27.29 }