<object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="mediaexport-title-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">12</property>
- <property name="label" translatable="yes">Ti_tle</property>
- <property name="use_underline">True</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">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="mediaexport-title-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Write %u for username, %n for real name of the user and %h for host name</property>
- <property name="tooltip_text" translatable="yes">Write %u for username, %n for real name of the user and %h for host name</property>
- <property name="invisible_char">●</property>
- <property name="width_chars">30</property>
- <property name="invisible_char_set">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">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="uris-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
public class Rygel.MediaExportPrefSection : PreferencesSection {
const string ENABLED_CHECK = "-enabled-checkbutton";
- const string TITLE_LABEL = "-title-label";
- const string TITLE_ENTRY = "-title-entry";
const string NAME = "MediaExport";
const string URIS_KEY = "uris";
const string URIS_LABEL = URIS_KEY + "-label";
const string CLEAR_BUTTON = "clear-button";
private CheckButton enabled_check;
- private Entry title_entry;
-
private ArrayList<Widget> widgets; // All widgets in this section
private TreeView treeview;
this.enabled_check = (CheckButton) builder.get_object (name.down () +
ENABLED_CHECK);
assert (this.enabled_check != null);
- this.title_entry = (Entry) builder.get_object (name.down () +
- TITLE_ENTRY);
- assert (this.title_entry != null);
- var title_label = (Label) builder.get_object (name.down () +
- TITLE_LABEL);
- assert (title_label != null);
- this.widgets.add (title_label);
try {
this.enabled_check.active = config.get_enabled (name);
this.enabled_check.active = false;
}
- string title;
- try {
- title = config.get_title (name);
- } catch (GLib.Error err) {
- title = name;
- }
-
- title = title.replace ("@REALNAME@", "%n");
- title = title.replace ("@USERNAME@", "%u");
- title = title.replace ("@HOSTNAME@", "%h");
- this.title_entry.set_text (title);
-
this.enabled_check.toggled.connect (this.on_enabled_check_toggled);
this.treeview = (TreeView) builder.get_object (URIS_TEXTVIEW);
UserConfig.ENABLED_KEY,
this.enabled_check.active);
- var title = this.title_entry.get_text ().replace ("%n", "@REALNAME@");
- title = title.replace ("%u", "@USERNAME@");
- title = title.replace ("%h", "@HOSTNAME@");
- this.config.set_string (this.name, UserConfig.TITLE_KEY, title);
-
TreeIter iter;
var uri_list = new ArrayList<string> ();