[phonemgr] Migrate from libglade to GtkBuilder
- From: Daniele Forsi <dforsi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phonemgr] Migrate from libglade to GtkBuilder
- Date: Sat, 5 Feb 2011 10:51:43 +0000 (UTC)
commit dead50a1899b0ade91cbdc7d9b66bf9422010521
Author: Francesco Marella <fmarl paranoici org>
Date: Tue Jan 18 01:01:31 2011 +0100
Migrate from libglade to GtkBuilder
Thanks to Mehmet Giritli, Francesco Marella and Bastien Nocera.
Closes: #590816
configure.in | 4 +-
data/Makefile.am | 2 +-
data/libephone.xml | 9 +
data/libgnome_bluetooth.xml | 8 +
data/phonemgr.glade | 1429 -------------------------------------------
data/phonemgr.ui | 947 ++++++++++++++++++++++++++++
po/POTFILES.in | 2 +-
src/app.h | 3 +-
src/e-phone-entry.c | 11 -
src/e-phone-entry.h | 3 -
src/ui.c | 194 +++----
11 files changed, 1041 insertions(+), 1571 deletions(-)
---
diff --git a/configure.in b/configure.in
index d7758bd..3d557eb 100644
--- a/configure.in
+++ b/configure.in
@@ -45,9 +45,9 @@ PKG_CHECK_MODULES(TMP_EVO, libebook-1.2,
PKG_CHECK_MODULES(LIBGSM, glib-2.0 gobject-2.0 $GNOKII_REQS gthread-2.0 bluez $evo_pc_file)
-PKG_CHECK_MODULES(PHONEMGR, gtk+-2.0 >= 2.10 glib-2.0 >= 2.13.0
+PKG_CHECK_MODULES(PHONEMGR, gtk+-2.0 >= 2.18 glib-2.0 >= 2.25.0
libcanberra-gtk gdk-pixbuf-2.0 gconf-2.0
- $GNOME_BLUETOOTH_REQS libglade-2.0 $evo_pc_file
+ $GNOME_BLUETOOTH_REQS $evo_pc_file
gmodule-2.0 dbus-glib-1 gnome-icon-theme >= 2.19.1
gtkspell-2.0
)
diff --git a/data/Makefile.am b/data/Makefile.am
index 5ac3507..87d3043 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS = icons
man_MANS = gnome-phone-manager.1
uidir = $(pkgdatadir)
-ui_DATA = phonemgr.glade
+ui_DATA = phonemgr.ui
schema_in_files = gnome-phone-manager.schemas.in
schemadir = $(GCONF_SCHEMA_FILE_DIR)
diff --git a/data/libephone.xml b/data/libephone.xml
new file mode 100644
index 0000000..06c3222
--- /dev/null
+++ b/data/libephone.xml
@@ -0,0 +1,9 @@
+<glade-catalog name="ephone" depends="gtk+">
+ <glade-widget-classes>
+ <glade-widget-class name="EPhoneEntry" parent="GtkEntry" generic-name="ephoneentry" title="EPhone Entry">
+ </glade-widget-class>
+ </glade-widget-classes>
+ <glade-widget-group name="ephone-widgets" title="EPhone Widgets">
+ <glade-widget-class-ref name="EPhoneEntry"/>
+ </glade-widget-group>
+</glade-catalog>
diff --git a/data/libgnome_bluetooth.xml b/data/libgnome_bluetooth.xml
new file mode 100644
index 0000000..8c9b045
--- /dev/null
+++ b/data/libgnome_bluetooth.xml
@@ -0,0 +1,8 @@
+<glade-catalog name="gnome-bluetooth" library="libgnome-bluetooth.so" depends="gtk+">
+ <glade-widget-classes>
+ <glade-widget-class name="BluetoothChooserButton" generic-name="bluetoothchooserbutton" title="Bluetooth Chooser Button" />
+ </glade-widget-classes>
+ <glade-widget-group name="gnome-bluetooth-widgets" title="Bluetooth Widgets">
+ <glade-widget-class-ref name="BluetoothChooserButton"/>
+ </glade-widget-group>
+</glade-catalog>
diff --git a/data/phonemgr.ui b/data/phonemgr.ui
new file mode 100644
index 0000000..610e098
--- /dev/null
+++ b/data/phonemgr.ui
@@ -0,0 +1,947 @@
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-requires ephone 0.0 -->
+ <!-- interface-requires gnome-bluetooth 0.0 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="sms_dialog">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Message Received</property>
+ <property name="resizable">False</property>
+ <property name="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>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="icon_name">phone</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="new_message_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><span weight="bold" size="larger">You have received a message</span></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Sender:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Date:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="messagecontents">
+ <property name="height_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="pixels_above_lines">2</property>
+ <property name="pixels_below_lines">2</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="left_margin">2</property>
+ <property name="right_margin">2</property>
+ <property name="cursor_visible">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="senderlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="datelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <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="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="helpbutton">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="replybutton">
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="icon_name">gnome-stock-mail-rpl</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Reply</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">helpbutton</action-widget>
+ <action-widget response="1">replybutton</action-widget>
+ <action-widget response="-5">okbutton</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="send_dialog">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Send Message</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image5">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="icon_name">phone</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox12">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="enter_message_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><span weight="bold" size="larger">Enter your text message</span></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Recipient:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Message:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">messagebody</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="messagebody">
+ <property name="height_request">60</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Enter the text message you want to send.</property>
+ <property name="pixels_above_lines">2</property>
+ <property name="pixels_below_lines">2</property>
+ <property name="wrap_mode">word</property>
+ <property name="left_margin">2</property>
+ <property name="right_margin">2</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Characters left:</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="charsleft">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="delivery_report">
+ <property name="label" translatable="yes" comments="This is a receipt from the SMS server saying the message has been delivered to the recipient's phone">_Notify when message is delivered</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="EPhoneEntry" id="recipient">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="sendhelpbutton">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="msgcancelbutton">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="sendbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="icon_name">gnome-stock-mail-snd</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Send</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">sendhelpbutton</action-widget>
+ <action-widget response="-6">msgcancelbutton</action-widget>
+ <action-widget response="-5">sendbutton</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="prefs_dialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Phone Manager Preferences</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox3">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkNotebook" id="notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <child>
+ <object class="GtkVBox" id="interfacebox">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="alertingframe">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="alerting_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Alerting</b></property>
+ <property name="use_markup">True</property>
+ <accessibility>
+ <relation type="label-for" target="alerting_box"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment12">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="alerting_box">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <accessibility>
+ <relation type="labelled-by" target="alerting_label"/>
+ </accessibility>
+ <child>
+ <object class="GtkCheckButton" id="prefs_popup">
+ <property name="label" translatable="yes">_Pop-up window for new messages</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="prefs_sound">
+ <property name="label" translatable="yes">Play _sound when messages arrive</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Interface</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="connectionbox">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="phoneframe">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="phone_connection_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Phone Connection</b></property>
+ <property name="use_markup">True</property>
+ <accessibility>
+ <relation type="label-for" target="phone_connection_box"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="phone_connection_box">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <accessibility>
+ <relation type="labelled-by" target="phone_connection_label"/>
+ </accessibility>
+ <child>
+ <object class="GtkVBox" id="bluetooth_box">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="btdevice">
+ <property name="label" translatable="yes">_Bluetooth</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Use Bluetooth wireless networking to connect to your phone</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="BluetoothChooserButton" id="btchooser">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="serialport1">
+ <property name="label" translatable="yes">Serial port _1 (/dev/ttyS0)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Connect using serial port 1, also known as COM1 or /dev/ttyS0</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">btdevice</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="serialport2">
+ <property name="label" translatable="yes">Serial port _2 (/dev/ttyS1)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Connect using serial port 2, also known as COM2 or /dev/ttyS1</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">btdevice</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="irdaport">
+ <property name="label" translatable="yes">I_nfra red (/dev/ircomm0)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Connect using infrared communication</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">btdevice</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="otherportbox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="otherport">
+ <property name="label" translatable="yes">Other _port</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Connect using an alternative serial device</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">btdevice</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkEntry" id="otherportentry">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="tooltip_text" translatable="yes">Alternative device filename, e.g. /dev/ttyS3</property>
+ <property name="text">/dev/ttyS2</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="automatedframe">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="automated_tasks_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Automated Tasks</b></property>
+ <property name="use_markup">True</property>
+ <accessibility>
+ <relation type="label-for" target="automated_tasks_box"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="automated_tasks_box">
+ <property name="visible">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="automated_tasks_label"/>
+ </accessibility>
+ <child>
+ <object class="GtkCheckButton" id="auto_retry">
+ <property name="label" translatable="yes">Automatically _retry connections</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Always try and reconnect whenever a connection is not immediately available. Use this with Bluetooth to ensure your phone connects whenever it comes in range.</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="sync_clock">
+ <property name="label" translatable="yes">Synchronise phone's _time and date</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Synchronise phone's time and date with the computer's clock</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Connection</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="prefsclosebutton">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-7">prefsclosebutton</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8638add..4269933 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,5 +8,5 @@ src/icon.c
src/main.c
src/menu.c
src/ui.c
-data/phonemgr.glade
+[type: gettext/glade] data/phonemgr.ui
data/gnome-phone-manager.schemas.in
diff --git a/src/app.h b/src/app.h
index afa9362..6d3d4d9 100644
--- a/src/app.h
+++ b/src/app.h
@@ -23,7 +23,6 @@
#define _APP_H
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <gconf/gconf-client.h>
#include "phonemgr-listener.h"
@@ -33,7 +32,7 @@ typedef struct _appinfo {
/* gui stuff */
GtkStatusIcon *tray_icon;
GtkMenu *menu;
- GladeXML *ui;
+ GtkBuilder *ui;
int iconstate;
int chars;
GtkWidget *send_item;
diff --git a/src/e-phone-entry.c b/src/e-phone-entry.c
index 1e1f279..f74fc60 100644
--- a/src/e-phone-entry.c
+++ b/src/e-phone-entry.c
@@ -269,14 +269,3 @@ e_phone_entry_get_number (EPhoneEntry *pentry)
return cleanup_number (pentry->phone_number);
}
-GtkWidget *
-e_phone_entry_new_from_glade (char *widget_name,
- char *string1, char *string2,
- int int1, int int2)
-{
- GtkWidget *w = e_phone_entry_new ();
- gtk_widget_set_name (w, widget_name);
- gtk_widget_show (w);
- return w;
-}
-
diff --git a/src/e-phone-entry.h b/src/e-phone-entry.h
index a3f1479..2b4eae6 100644
--- a/src/e-phone-entry.h
+++ b/src/e-phone-entry.h
@@ -54,9 +54,6 @@ GType e_phone_entry_get_type (void);
GtkWidget *e_phone_entry_new (void);
char *e_phone_entry_get_number (EPhoneEntry *pentry);
-GtkWidget *e_phone_entry_new_from_glade (char *widget_name,
- char *string1, char *string2,
- int int1, int int2);
G_END_DECLS
diff --git a/src/ui.c b/src/ui.c
index b270d2d..affc935 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -21,7 +21,6 @@
#include <glib/gi18n.h>
#include <stdlib.h>
-#include <glade/glade.h>
#include <gtk/gtk.h>
#include <gtkspell/gtkspell.h>
#include <canberra-gtk.h>
@@ -37,58 +36,6 @@
#define MAX_MESSAGE_LENGTH 160
-static void
-boldify_label (GladeXML *xml, const char *name)
-{
- GtkWidget *widget;
-
- widget = glade_xml_get_widget (xml, name);
-
- if (widget == NULL) {
- /* g_warning ("widget '%s' not found", name); */
- return;
- }
-
- /* this way is probably better, but for some reason doesn't work with
- * labels with mnemonics.
-
- static PangoAttrList *pattrlist = NULL;
-
- if (pattrlist == NULL) {
- PangoAttribute *attr;
-
- pattrlist = pango_attr_list_new ();
- attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
- attr->start_index = 0;
- attr->end_index = G_MAXINT;
- pango_attr_list_insert (pattrlist, attr);
- }
- gtk_label_set_attributes (GTK_LABEL (widget), pattrlist);*/
-
- char *str_final;
- str_final = g_strdup_printf ("<b>%s</b>", gtk_label_get_label (GTK_LABEL (widget)));
- gtk_label_set_markup_with_mnemonic (GTK_LABEL (widget), str_final);
- g_free (str_final);
-}
-
-static void
-bigger_label (GladeXML *xml, const char *name)
-{
- GtkWidget *widget;
-
- widget = glade_xml_get_widget (xml, name);
-
- if (widget == NULL) {
- /* g_warning ("widget '%s' not found", name); */
- return;
- }
-
- char *str_final;
- str_final = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>", gtk_label_get_label (GTK_LABEL (widget)));
- gtk_label_set_markup_with_mnemonic (GTK_LABEL (widget), str_final);
- g_free (str_final);
-}
-
static char *
get_resource (MyApp *app, char *uiresname)
{
@@ -122,35 +69,33 @@ chooser_created (BluetoothChooserButton *button, BluetoothChooser *chooser, gpoi
NULL);
}
-GtkWidget *
-bluetooth_chooser_button_create (void)
-{
- GtkWidget *widget;
-
- widget = bluetooth_chooser_button_new ();
- g_signal_connect (G_OBJECT (widget), "chooser-created",
- G_CALLBACK (chooser_created), NULL);
- gtk_widget_show (widget);
-
- return widget;
-}
-
static
-GladeXML *get_ui (MyApp *app, char *widget)
+GtkBuilder *get_ui (MyApp *app, char *widget)
{
char *fname;
- GladeXML *ui;
+ GError* error = NULL;
+ GtkBuilder *ui;
- fname = get_resource (app, "phonemgr.glade");
+ fname = get_resource (app, "phonemgr.ui");
- ui = glade_xml_new (fname, widget, NULL);
- g_free (fname);
+ ui = gtk_builder_new ();
- boldify_label (ui, "alerting_label");
- boldify_label (ui, "phone_connection_label");
- boldify_label (ui, "automated_tasks_label");
- bigger_label (ui, "new_message_label");
- bigger_label (ui, "enter_message_label");
+ if (widget != NULL) {
+ char **widgets[2] = { NULL, NULL };
+ widgets[0] = widget;
+
+ if (!gtk_builder_add_objects_from_file (ui, fname, widgets, &error)) {
+ g_warning ("Couldn't load builder file: %s", error->message);
+ g_error_free (error);
+ }
+ } else {
+ if (!gtk_builder_add_from_file (ui, fname, &error)) {
+ g_warning ("Couldn't load builder file: %s", error->message);
+ g_error_free (error);
+ }
+ }
+
+ g_free (fname);
return ui;
}
@@ -182,14 +127,14 @@ set_dependent_widget (MyApp *app, int conn_type, gboolean active)
switch (conn_type) {
case CONNECTION_BLUETOOTH:
/* only set sensitive if bluetooth available */
- w = GTK_WIDGET (glade_xml_get_widget (app->ui, "btchooser"));
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "btchooser"));
if (bluetooth_chooser_button_available (BLUETOOTH_CHOOSER_BUTTON (w)) == FALSE
|| phonemgr_utils_connection_is_supported (PHONEMGR_CONNECTION_BLUETOOTH) == FALSE)
active = FALSE;
gtk_widget_set_sensitive (w, active);
break;
case CONNECTION_OTHER:
- w = GTK_WIDGET (glade_xml_get_widget (app->ui, "otherportentry"));
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "otherportentry"));
gtk_widget_set_sensitive (w, active);
break;
}
@@ -213,12 +158,12 @@ on_conn_port_change (GtkWidget *widget, MyApp *app)
}
static gboolean
-message_dialog_reply (GladeXML *ui)
+message_dialog_reply (GtkBuilder *ui)
{
MyApp *app;
- GtkWidget *dialog = glade_xml_get_widget (ui, "sms_dialog");
+ GtkWidget *dialog = GTK_WIDGET (gtk_builder_get_object (ui, "sms_dialog"));
GtkLabel *sender = GTK_LABEL (
- glade_xml_get_widget (ui, "senderlabel"));
+ gtk_builder_get_object (ui, "senderlabel"));
app = (MyApp *) g_object_get_data (G_OBJECT (dialog),
"app");
@@ -230,13 +175,13 @@ message_dialog_reply (GladeXML *ui)
}
#define S_CONNECT(x, y) \
- w = glade_xml_get_widget (app->ui, (x)); \
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, (x))); \
g_object_set_data (G_OBJECT (w), "port", GINT_TO_POINTER (y)); \
g_signal_connect (G_OBJECT (w), "toggled", \
G_CALLBACK (on_conn_port_change), (gpointer)app)
#define S_ACTIVE(x, y) \
- w = glade_xml_get_widget (app->ui, (x)); \
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, (x))); \
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), ctype==y);
static void
@@ -245,7 +190,7 @@ populate_prefs (MyApp *app)
GtkWidget *w;
char *c;
int ctype;
-
+
ctype = gconf_client_get_int (app->client,
CONFBASE"/connection_type", NULL);
@@ -254,7 +199,7 @@ populate_prefs (MyApp *app)
set_dependent_widget (app, CONNECTION_OTHER,
ctype == CONNECTION_OTHER);
- w = GTK_WIDGET (glade_xml_get_widget (app->ui, "otherportentry"));
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "otherportentry"));
c = gconf_client_get_string (app->client,
CONFBASE"/other_serial", NULL);
if (c != NULL) {
@@ -277,7 +222,7 @@ apply_prefs (MyApp *app)
{
GtkWidget *w;
- w = GTK_WIDGET (glade_xml_get_widget (app->ui, "otherportentry"));
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "otherportentry"));
gconf_client_set_string (app->client,
CONFBASE"/other_serial",
gtk_entry_get_text (GTK_ENTRY (w)), NULL);
@@ -295,7 +240,7 @@ prefs_dialog_response (GtkWidget *dialog,
}
static gboolean
-destroy_send_dialog (GtkDialog *dialog, GladeXML *ui)
+destroy_send_dialog (GtkDialog *dialog, GtkBuilder *ui)
{
g_object_unref (ui);
gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -303,7 +248,7 @@ destroy_send_dialog (GtkDialog *dialog, GladeXML *ui)
}
static void
-set_send_sensitivity (GtkWidget *w, GladeXML *ui)
+set_send_sensitivity (GtkWidget *w, GtkBuilder *ui)
{
EPhoneEntry *entry;
GtkTextView *view;
@@ -314,11 +259,11 @@ set_send_sensitivity (GtkWidget *w, GladeXML *ui)
char *work;
char *text;
- left = GTK_LABEL (glade_xml_get_widget (ui, "charsleft"));
- view = GTK_TEXT_VIEW (glade_xml_get_widget (ui, "messagebody"));
+ left = GTK_LABEL (gtk_builder_get_object (ui, "charsleft"));
+ view = GTK_TEXT_VIEW (gtk_builder_get_object (ui, "messagebody"));
buf = gtk_text_view_get_buffer (view);
- entry = E_PHONE_ENTRY (glade_xml_get_widget (ui, "recipient"));
- sendbutton = GTK_WIDGET (glade_xml_get_widget (ui, "sendbutton"));
+ entry = E_PHONE_ENTRY (gtk_builder_get_object (ui, "recipient"));
+ sendbutton = GTK_WIDGET (gtk_builder_get_object (ui, "sendbutton"));
l = gtk_text_buffer_get_char_count (buf);
text = e_phone_entry_get_number (entry);
@@ -338,13 +283,13 @@ set_send_sensitivity (GtkWidget *w, GladeXML *ui)
}
static void
-phone_number_changed (GtkWidget *entry, char *phone_number, GladeXML *ui)
+phone_number_changed (GtkWidget *entry, char *phone_number, GtkBuilder *ui)
{
set_send_sensitivity (entry, ui);
}
static void
-send_message (GtkWidget *w, GladeXML *ui)
+send_message (GtkWidget *w, GtkBuilder *ui)
{
GtkTextBuffer *buf;
GtkTextView *view;
@@ -356,11 +301,11 @@ send_message (GtkWidget *w, GladeXML *ui)
MyApp *app = (MyApp *) g_object_get_data (G_OBJECT (ui), "app");
- dialog = GTK_DIALOG (glade_xml_get_widget (ui, "send_dialog"));
- view = GTK_TEXT_VIEW (glade_xml_get_widget (ui, "messagebody"));
+ dialog = GTK_DIALOG (gtk_builder_get_object (ui, "send_dialog"));
+ view = GTK_TEXT_VIEW (gtk_builder_get_object (ui, "messagebody"));
buf = gtk_text_view_get_buffer (view);
- entry = E_PHONE_ENTRY (glade_xml_get_widget (ui, "recipient"));
- delivery_report = GTK_TOGGLE_BUTTON (glade_xml_get_widget (ui, "delivery_report"));
+ entry = E_PHONE_ENTRY (gtk_builder_get_object (ui, "recipient"));
+ delivery_report = GTK_TOGGLE_BUTTON (gtk_builder_get_object (ui, "delivery_report"));
gtk_text_buffer_get_start_iter (buf, &s);
gtk_text_buffer_get_end_iter (buf, &e);
@@ -381,19 +326,19 @@ create_send_dialog (MyApp *app, GtkDialog *parent, const char *recip)
GtkTextView *view;
GtkEntry *entry;
GtkDialog *dialog;
- GladeXML *ui;
+ GtkBuilder *ui;
GtkWidget *w;
ui = get_ui (app, "send_dialog");
- dialog = GTK_DIALOG (glade_xml_get_widget (ui, "send_dialog"));
+ dialog = GTK_DIALOG (gtk_builder_get_object (ui, "send_dialog"));
if (parent) {
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
}
- view = GTK_TEXT_VIEW (glade_xml_get_widget (ui, "messagebody"));
+ view = GTK_TEXT_VIEW (gtk_builder_get_object (ui, "messagebody"));
buf = gtk_text_view_get_buffer (view);
gtk_text_buffer_set_text (buf, "", 0);
@@ -402,7 +347,7 @@ create_send_dialog (MyApp *app, GtkDialog *parent, const char *recip)
g_error_free (err);
}
- entry = GTK_ENTRY (glade_xml_get_widget (ui, "recipient"));
+ entry = GTK_ENTRY (gtk_builder_get_object (ui, "recipient"));
if (recip)
gtk_entry_set_text (entry, recip);
else
@@ -419,7 +364,7 @@ create_send_dialog (MyApp *app, GtkDialog *parent, const char *recip)
g_signal_connect (G_OBJECT (dialog), "hide",
G_CALLBACK (destroy_send_dialog), (gpointer) ui);
- w = GTK_WIDGET (glade_xml_get_widget (ui, "msgcancelbutton"));
+ w = GTK_WIDGET (gtk_builder_get_object (ui, "msgcancelbutton"));
g_signal_connect_swapped (G_OBJECT (w), "clicked",
G_CALLBACK (gtk_widget_hide), (gpointer) dialog);
@@ -428,7 +373,7 @@ create_send_dialog (MyApp *app, GtkDialog *parent, const char *recip)
g_signal_connect (G_OBJECT (buf), "changed",
G_CALLBACK (set_send_sensitivity), (gpointer) ui);
- w = GTK_WIDGET (glade_xml_get_widget (ui, "sendbutton"));
+ w = GTK_WIDGET (gtk_builder_get_object (ui, "sendbutton"));
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (send_message), (gpointer) ui);
@@ -454,6 +399,7 @@ ui_init (MyApp *app)
{
GConfBridge *bridge;
GtkWidget *w;
+ GtkWidget *ep = e_phone_entry_new ();
app->ui = get_ui (app, NULL);
bridge = gconf_bridge_get ();
@@ -463,16 +409,20 @@ ui_init (MyApp *app)
/* close button and windowframe close button just hide the
prefs panel */
- g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (app->ui, "prefs_dialog")),
+ g_signal_connect_swapped (G_OBJECT (gtk_builder_get_object (app->ui, "prefs_dialog")),
"delete-event", G_CALLBACK (gtk_widget_hide),
- G_OBJECT (glade_xml_get_widget (app->ui, "prefs_dialog")));
+ G_OBJECT (gtk_builder_get_object (app->ui, "prefs_dialog")));
/* response */
- g_signal_connect (glade_xml_get_widget (app->ui, "prefs_dialog"),
+ g_signal_connect (gtk_builder_get_object (app->ui, "prefs_dialog"),
"response",
G_CALLBACK (prefs_dialog_response),
app);
+ w = G_OBJECT (gtk_builder_get_object (app->ui, "btchooser"));
+ g_signal_connect (G_OBJECT (w), "chooser-created",
+ G_CALLBACK (chooser_created), NULL);
+
/* connect signal handlers for radio buttons */
S_CONNECT("btdevice", CONNECTION_BLUETOOTH);
S_CONNECT("serialport1", CONNECTION_SERIAL1);
@@ -483,25 +433,25 @@ ui_init (MyApp *app)
/* Connect a few toggle buttons */
gconf_bridge_bind_property (bridge,
CONFBASE"/auto_retry",
- G_OBJECT (glade_xml_get_widget (app->ui, "auto_retry")),
+ G_OBJECT (gtk_builder_get_object (app->ui, "auto_retry")),
"active");
gconf_bridge_bind_property (bridge,
CONFBASE"/sync_clock",
- G_OBJECT (glade_xml_get_widget (app->ui, "sync_clock")),
+ G_OBJECT (gtk_builder_get_object (app->ui, "sync_clock")),
"active");
gconf_bridge_bind_property (bridge,
CONFBASE"/popup_messages",
- G_OBJECT (glade_xml_get_widget (app->ui, "prefs_popup")),
+ G_OBJECT (gtk_builder_get_object (app->ui, "prefs_popup")),
"active");
gconf_bridge_bind_property (bridge,
CONFBASE"/sound_alert",
- G_OBJECT (glade_xml_get_widget (app->ui, "prefs_sound")),
+ G_OBJECT (gtk_builder_get_object (app->ui, "prefs_sound")),
"active");
/* And the address chooser */
gconf_bridge_bind_property (bridge,
CONFBASE"/bluetooth_addr",
- G_OBJECT (glade_xml_get_widget (app->ui, "btchooser")),
+ G_OBJECT (gtk_builder_get_object (app->ui, "btchooser")),
"device");
/* set up popup on message */
@@ -519,11 +469,11 @@ ui_hide (MyApp *app)
GtkWidget *w;
GdkDisplay *display;
- w = glade_xml_get_widget (app->ui, "prefs_dialog");
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "prefs_dialog"));
display = gtk_widget_get_display (w);
gtk_widget_hide (w);
- w = glade_xml_get_widget (app->ui, "send_dialog");
+ w = GTK_WIDGET (gtk_builder_get_object (app->ui, "send_dialog"));
gtk_widget_hide (w);
gdk_display_sync (display);
@@ -532,7 +482,7 @@ ui_hide (MyApp *app)
void
show_prefs_window (MyApp *app)
{
- GtkWidget *prefs = glade_xml_get_widget (app->ui, "prefs_dialog");
+ GtkWidget *prefs = GTK_WIDGET (gtk_builder_get_object (app->ui, "prefs_dialog"));
populate_prefs (app);
gtk_widget_show (prefs);
}
@@ -555,7 +505,7 @@ dequeue_message (MyApp *app)
GtkLabel *l_sender, *l_sent;
GtkTextBuffer *buf;
char *time;
- GladeXML *ui;
+ GtkBuilder *ui;
GtkWidget *w;
g_mutex_lock (app->message_mutex);
@@ -574,7 +524,7 @@ dequeue_message (MyApp *app)
ui = get_ui (app, "sms_dialog");
- w = GTK_WIDGET (glade_xml_get_widget (ui, "sms_dialog"));
+ w = GTK_WIDGET (gtk_builder_get_object (ui, "sms_dialog"));
g_signal_connect_swapped (G_OBJECT (w), "delete-event",
G_CALLBACK (gtk_widget_destroy), (gpointer) w);
@@ -582,17 +532,17 @@ dequeue_message (MyApp *app)
dialog = GTK_DIALOG (w);
- w = GTK_WIDGET (glade_xml_get_widget (ui, "okbutton"));
+ w = GTK_WIDGET (gtk_builder_get_object (ui, "okbutton"));
g_signal_connect_swapped(G_OBJECT (w), "clicked",
G_CALLBACK (gtk_widget_destroy), (gpointer) dialog);
- w = GTK_WIDGET (glade_xml_get_widget (ui, "replybutton"));
+ w = GTK_WIDGET (gtk_builder_get_object (ui, "replybutton"));
g_signal_connect_swapped (G_OBJECT (w), "clicked",
G_CALLBACK (message_dialog_reply), (gpointer) ui);
- l_sender = GTK_LABEL (glade_xml_get_widget (ui, "senderlabel"));
- l_sent = GTK_LABEL (glade_xml_get_widget (ui, "datelabel"));
- textview = GTK_TEXT_VIEW (glade_xml_get_widget (ui, "messagecontents"));
+ l_sender = GTK_LABEL (gtk_builder_get_object (ui, "senderlabel"));
+ l_sent = GTK_LABEL (gtk_builder_get_object (ui, "datelabel"));
+ textview = GTK_TEXT_VIEW (gtk_builder_get_object (ui, "messagecontents"));
buf = gtk_text_view_get_buffer (textview);
gtk_text_buffer_set_text (buf, msg->message, strlen (msg->message));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]