Back to index

im-sdk  12.3.91
Functions
preference.h File Reference
#include "gnome-im-switcher.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void gimlet_preference_init (GimletWindow *gimlet)
GtkWidget * gimlet_preference_dialog_new (GtkWindow *transient_parent, GimletWindow *gimlet)

Function Documentation

GtkWidget* gimlet_preference_dialog_new ( GtkWindow *  transient_parent,
GimletWindow *  gimlet 
)

Definition at line 342 of file preference.c.

{
  GladeXML *xml;
  GtkWidget *w;
  GtkWidget *dialog;

  xml = gimlet_util_load_glade_file (GIMLET_GLADE_FILE,
                                 "preference-dialog",
                                 transient_parent);
  if (xml == NULL)
    return NULL;

  /* The dialog itself */
  dialog = glade_xml_get_widget (xml, "preference-dialog");
  g_object_set_data (G_OBJECT (dialog), "gimlet", gimlet);

  gimlet_util_set_unique_role (GTK_WINDOW (dialog), "gimlet-preferences");

  g_signal_connect (G_OBJECT (dialog), "response",
                    G_CALLBACK (response_callback),
                    NULL);

  /* Input Language */

#ifdef MEANINGLESS_OPTION_PERHAPS
  w = glade_xml_get_widget (xml, "default-input-language-option");
  gimlet->input_language_option_menu = w;
  gtk_widget_set_sensitive (gimlet->input_language_option_menu, FALSE);

  add_languages_in_option_menu (gimlet);

  w = glade_xml_get_widget (xml, "follow-current-locale");
  g_signal_connect (G_OBJECT (w), "toggled",
                  G_CALLBACK (on_follow_current_locale_toggled), gimlet);
  if (gimlet->input_lang_policy == FOLLOW_CURRENT_LOCALE)
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);

  w = glade_xml_get_widget (xml, "follow-option-menu");
  g_signal_connect (G_OBJECT (w), "toggled",
                  G_CALLBACK (on_follow_option_menu_toggled), gimlet);
  if (gimlet->input_lang_policy == FOLLOW_OPTION_MENU)
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);

#endif

  w = glade_xml_get_widget (xml, "follow-application");
  g_signal_connect (G_OBJECT (w), "toggled",
                  G_CALLBACK (on_follow_application_toggled), gimlet);
  if (gimlet->input_lang_policy == FOLLOW_APPLICATION)
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);

  w = glade_xml_get_widget (xml, "follow-quick-access-menu");
  g_signal_connect (G_OBJECT (w), "toggled",
                  G_CALLBACK (on_follow_quick_access_menu_toggled), gimlet);
  if (gimlet->input_lang_policy == FOLLOW_QUICK_ACCESS_MENU)
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);

  w = glade_xml_get_widget (xml, "conversion_on_start_checkbutton");
  g_object_set_data (G_OBJECT (dialog),
                     "conversion-on-start-checkbutton",
                     w);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
                            gimlet->conversion_on_start);

  conversion_on_start_checkbutton_toggled (GTK_TOGGLE_BUTTON (w), dialog);
       
  g_signal_connect (G_OBJECT (w), "toggled", 
                  G_CALLBACK (conversion_on_start_checkbutton_toggled), 
                  dialog);
  return dialog;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gimlet_preference_init ( GimletWindow *  gimlet)

Definition at line 203 of file preference.c.

{
  int int_value;

  panel_applet_add_preferences (gimlet->applet,
                            "/schemas/apps/gimlet/preference",
                            NULL);
  if (default_client == NULL)
    {
      default_client = gconf_client_get_default ();
      g_object_ref (G_OBJECT (default_client));
    }

  /* Input Language */
  int_value = panel_applet_gconf_get_int (gimlet->applet,
                                     "input_language_policy", NULL);
  gimlet->input_lang_policy = int_value;

  gimlet->conversion_on_start = panel_applet_gconf_get_bool (gimlet->applet,
                                                      "conversion_on_start", NULL);

  /* input method settings */
  init_im_settings (gimlet);
  gconf_client_notify_add (default_client, ENABLE_IM_KEY,
                        (GConfClientNotifyFunc)im_setting_changed,
                        gimlet, NULL, NULL);
  gconf_client_notify_add (default_client, ENABLE_STATUS_KEY,
                        (GConfClientNotifyFunc)im_setting_changed,
                        gimlet, NULL, NULL);
  gconf_client_notify_add (default_client, STATUS_PLACEMENT_KEY,
                        (GConfClientNotifyFunc)im_setting_changed,
                        gimlet, NULL, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function: