gedit-plugins r396 - in trunk: . plugins/sessionsaver
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit-plugins r396 - in trunk: . plugins/sessionsaver
- Date: Sun, 23 Nov 2008 11:03:22 +0000 (UTC)
Author: icq
Date: Sun Nov 23 11:03:21 2008
New Revision: 396
URL: http://svn.gnome.org/viewvc/gedit-plugins?rev=396&view=rev
Log:
2008-11-23 Ignacio Casal Quinteiro <nacho resa gmail com>
* plugins/sessionsaver/sessionsaver.ui:
* plugins/sessionsaver/__init__.py:
* plugins/sessionsaver/Makefile.am:
* plugins/sessionsaver/dialogs.py:
* configure.ac:
Ported to gtkbuilder.
Added:
trunk/plugins/sessionsaver/sessionsaver.ui
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/plugins/sessionsaver/Makefile.am
trunk/plugins/sessionsaver/__init__.py
trunk/plugins/sessionsaver/dialogs.py
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Nov 23 11:03:21 2008
@@ -60,7 +60,6 @@
gtk+-2.0 >= 2.13.0
gtksourceview-2.0 >= 2.4.0
gedit-2.20 >= 2.24.0
- libglade-2.0 >= 2.4.0
gnome-vfs-2.0 >= 2.13.4
])
GEDIT_LIBS="${GEDIT_LIBS}"
Modified: trunk/plugins/sessionsaver/Makefile.am
==============================================================================
--- trunk/plugins/sessionsaver/Makefile.am (original)
+++ trunk/plugins/sessionsaver/Makefile.am Sun Nov 23 11:03:21 2008
@@ -6,7 +6,7 @@
sessionsaverdir=$(plugindir)/sessionsaver
sessionsaver_PYTHON = __init__.py store.py dialogs.py
-sessionsaver_DATA = sessionsaver.glade
+sessionsaver_DATA = sessionsaver.ui
plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
Modified: trunk/plugins/sessionsaver/__init__.py
==============================================================================
--- trunk/plugins/sessionsaver/__init__.py (original)
+++ trunk/plugins/sessionsaver/__init__.py Sun Nov 23 11:03:21 2008
@@ -53,7 +53,6 @@
</menu>
</menubar>
</ui>"""
- GLADE_FILE = os.path.join(os.path.dirname(__file__), "sessionsaver.glade")
def __init__(self, plugin, window):
self.plugin = plugin
Modified: trunk/plugins/sessionsaver/dialogs.py
==============================================================================
--- trunk/plugins/sessionsaver/dialogs.py (original)
+++ trunk/plugins/sessionsaver/dialogs.py Sun Nov 23 11:03:21 2008
@@ -4,7 +4,7 @@
import gobject
import gedit
-import gtk, gtk.glade
+import gtk
import os.path
import gettext
from store import Session
@@ -91,7 +91,7 @@
return None
class Dialog(object):
- GLADE_FILE = os.path.join(os.path.dirname(__file__), "sessionsaver.glade")
+ UI_FILE = os.path.join(os.path.dirname(__file__), "sessionsaver.ui")
def __new__(cls, *args):
if not cls.__dict__.has_key('_instance') or cls._instance is None:
@@ -105,12 +105,14 @@
parent_window = gedit.app_get_default().get_active_window()
self.parent = parent_window
- self.ui = gtk.glade.XML(self.GLADE_FILE, main_widget, domain=GETTEXT_PACKAGE)
- self.dialog = self.ui.get_widget(main_widget)
+ self.ui = gtk.Builder()
+ self.ui.add_from_file(self.UI_FILE)
+ self.ui.set_translation_domain(domain=GETTEXT_PACKAGE)
+ self.dialog = self.ui.get_object(main_widget)
self.dialog.connect('delete-event', self.on_delete_event)
def __getitem__(self, item):
- return self.ui.get_widget(item)
+ return self.ui.get_object(item)
def on_delete_event(self, dialog, event):
dialog.hide()
@@ -170,7 +172,7 @@
'on_open_button_clicked': self.on_open_button_clicked,
'on_delete_button_clicked': self.on_delete_button_clicked
}
- self.ui.signal_autoconnect(handlers)
+ self.ui.connect_signals(handlers)
def on_delete_event(self, dialog, event):
dialog.hide()
Added: trunk/plugins/sessionsaver/sessionsaver.ui
==============================================================================
--- (empty file)
+++ trunk/plugins/sessionsaver/sessionsaver.ui Sun Nov 23 11:03:21 2008
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!-- Generated with glade3
+ Version: 2.91.3
+ Date: Sat Jan 20 23:32:12 2007
+ User: sf
+ Host: antea
+-->
+<interface>
+ <object class="GtkDialog" id="save-session-dialog">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Save session</property>
+ <property name="resizable">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0.000000</property>
+ <property name="label" translatable="yes">Session name:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="session-name">
+ <property name="visible">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxentry-entry1">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="label" translatable="no">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="label" translatable="no">gtk-save</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button2</action-widget>
+ <action-widget response="-5">button1</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkWindow" id="session-manager-dialog">
+ <property name="width_request">400</property>
+ <property name="height_request">200</property>
+ <property name="title" translatable="yes">Saved Sessions</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <child>
+ <object class="GtkTreeView" id="session-view">
+ <property name="visible">True</property>
+ <property name="headers_visible">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox1">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <child>
+ <object class="GtkButton" id="open-button">
+ <property name="visible">True</property>
+ <property name="label" translatable="no">gtk-open</property>
+ <property name="use_stock">True</property>
+ <signal handler="on_open_button_clicked" name="clicked"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete-button">
+ <property name="visible">True</property>
+ <property name="label" translatable="no">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <signal handler="on_delete_button_clicked" name="clicked"/>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close-button">
+ <property name="visible">True</property>
+ <property name="label" translatable="no">gtk-close</property>
+ <property name="use_stock">True</property>
+ <signal handler="on_close_button_clicked" name="clicked"/>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]