Changeset 1308


Ignore:
Timestamp:
03/09/07 19:27:21 (6 years ago)
Author:
thomas
Message:
  • Add a command line option to to the dialer to show the gui on first run
  • Make sure no windows are shown and then hidden in openmoko-dialer
Location:
trunk/src/target/OM-2007/applications/openmoko-dialer/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c

    r1298 r1308  
    249249} 
    250250 
     251static gboolean show_gui; 
     252 
     253static GOptionEntry entries[] =  
     254{ 
     255  { "show-gui", 's', 0, G_OPTION_ARG_NONE, &show_gui, "Show the GUI at startup (default off)", "N" }, 
     256  { NULL } 
     257}; 
     258 
     259 
    251260int main( int argc, char** argv ) 
    252261{ 
     
    259268    { 
    260269      /* Add init code. */ 
     270      GError *error = NULL; 
     271      GOptionContext *context = g_option_context_new (""); 
     272 
     273      g_option_context_add_main_entries (context, entries, NULL); 
     274      g_option_context_add_group (context, gtk_get_option_group (TRUE)); 
     275      g_option_context_parse (context, &argc, &argv, &error); 
     276 
     277      g_option_context_free (context); 
    261278    } 
    262279  lockapp = testlock ("/tmp/dialer.lock"); 
     
    298315  DBG_MSG ("\nusage: \"openmoko-dialer\" will not show any GUI initialy until you reactivate the app using another \"openmoko-dialer\" command"); 
    299316 
    300  
     317if (show_gui) 
     318{ 
     319  handle_sigusr1 (SIGUSR1); 
     320} 
    301321 
    302322//from now on we will not use multithreads. 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c

    r1216 r1308  
    9191 
    9292//start dialling. 
    93   gtk_widget_show (appdata->window_history); 
     93  gtk_widget_show_all (appdata->window_history); 
    9494 
    9595} 
     
    148148 
    149149//start dialling. 
    150   gtk_widget_show (appdata->window_outgoing); 
     150  gtk_widget_show_all (appdata->window_outgoing); 
    151151 
    152152  g_free (codesinput); 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c

    r1171 r1308  
    363363 
    364364   //FIXME: without gtk_widget_show_all first and then hide, the history view will not show properly. -tony 
    365    gtk_widget_show_all(GTK_WIDGET(window)); 
     365   //gtk_widget_show_all(GTK_WIDGET(window)); 
    366366 
    367367    //now the wheel and tool box, why should the wheel and toolbox created after the gtk_widget_show_all??? 
     
    379379 
    380380    g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)), 
    381                       "press_bottom", 
     381                      "prehttp://planet.gnome.org/ss_bottom", 
    382382                      G_CALLBACK (cb_tool_button_history_back_clicked), 
    383383                      p_dialer_data); 
     
    387387 
    388388    /* TODO: remove the GTK_WIDGET() casts when libmokoui is fixed */ 
    389     button = 
    390       GTK_WIDGET (moko_finger_tool_box_add_button_without_label (tools)); 
     389    button = moko_finger_tool_box_add_button_without_label (tools); 
    391390    image = file_new_image_from_relative_path ("phone.png"); 
    392391    moko_pixmap_button_set_finger_toolbox_btn_center_image (MOKO_PIXMAP_BUTTON 
     
    414413                      G_CALLBACK (cb_tool_button_history_delete_clicked), 
    415414                      p_dialer_data); 
    416     //gtk_widget_show (GTK_WIDGET (tools)); 
    417  
    418415    button = 
    419416      GTK_WIDGET (moko_finger_tool_box_add_button_without_label (tools)); 
     
    425422                      p_dialer_data); 
    426423 
    427     //gtk_widget_show (GTK_WIDGET (tools)); 
    428  
    429424    p_dialer_data->wheel_history = GTK_WIDGET (moko_finger_window_get_wheel (window)); 
    430425    p_dialer_data->toolbox_history = GTK_WIDGET (tools); 
    431     gtk_widget_hide(GTK_WIDGET(window)); 
    432426    DBG_LEAVE (); 
    433427  } 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c

    r1298 r1308  
    292292 
    293293 
    294     gtk_widget_show_all (GTK_WIDGET (window)); 
    295  
    296  
    297     gtk_widget_hide (GTK_WIDGET (window)); 
    298  
    299  
    300294    moko_dialer_status_set_title_label (MOKO_DIALER_STATUS (status), "Incoming call"); 
    301295    moko_dialer_status_set_status_label (MOKO_DIALER_STATUS (status), ""); 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-outgoing.c

    r1216 r1308  
    5454 
    5555 
    56 //transfer the contact info 
     56  //transfer the contact info 
    5757  window_talking_prepare (appdata); 
    5858 
    59 //start dialling. 
     59  //start dialling. 
    6060 
    6161  DBG_TRACE (); 
    62   gtk_widget_show (appdata->window_talking); 
     62  gtk_widget_show_all (appdata->window_talking); 
    6363 
    6464 
     
    282282    g_signal_connect (G_OBJECT (button), "clicked", 
    283283                      G_CALLBACK (cb_redial_button_clicked), p_dialer_data); 
    284 //gtk_widget_set_size_request(button,100,32); 
    285284    gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE, 40); 
    286 //gtk_widget_set_size_request(button,60,24); 
     285    g_object_set (G_OBJECT (button), "no-show-all", TRUE, NULL); 
    287286 
    288287 
     
    295294    gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE, 40); 
    296295 
    297  
    298  
    299  
    300296    gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 50); 
    301297 
     
    308304    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE); //FIXME: this line seems only necessary on my PC. tony 
    309305    moko_finger_window_set_contents (window, GTK_WIDGET (vbox)); 
    310  
    311  
    312     gtk_widget_show_all (GTK_WIDGET (window)); 
    313  
    314     gtk_widget_hide (p_dialer_data->buttonRedial); 
    315  
    316  
    317     gtk_widget_hide (GTK_WIDGET (window)); 
    318  
    319306 
    320307    moko_dialer_status_set_title_label (MOKO_DIALER_STATUS (status), "Outgoing call"); 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c

    r1171 r1308  
    219219    p_dialer_data->window_pin = window; 
    220220 
    221     gtk_widget_show_all (GTK_WIDGET (window)); 
    222     gtk_widget_hide (GTK_WIDGET (window)); 
    223  
    224  
    225221  } 
    226222 
  • trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-talking.c

    r1171 r1308  
    350350    gtk_box_pack_start (GTK_BOX (vbox), content_dtmf, FALSE, FALSE, 0); 
    351351    p_dialer_data->content_dtmf = content_dtmf; 
    352  
    353  
    354 //now the container--window 
     352    g_object_set (G_OBJECT (content_dtmf), "no-show-all", TRUE); 
     353 
     354 
     355    //now the container--window 
    355356    window = MOKO_FINGER_WINDOW (moko_finger_window_new ()); 
    356357    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE); 
     
    363364 
    364365 
    365  
    366  
    367     gtk_widget_show_all (GTK_WIDGET (window)); 
    368  
    369 //the gtk_widget_show_all is really bad, cause i have to call it and then hide some widgets. 
    370  
    371     gtk_widget_hide (content_dtmf); 
    372  
    373  
    374366    //now the wheel and tool box, why should the wheel and toolbox created after the gtk_widget_show_all??? 
    375 //   gtk_widget_show(GTK_WIDGET(moko_finger_window_get_wheel(window))); 
    376367    wheel=moko_finger_window_get_wheel (window); 
    377368    g_signal_connect (G_OBJECT (wheel), 
     
    419410    p_dialer_data->toolbox_talking = GTK_WIDGET (tools); 
    420411 
    421     //gtk_widget_hide(window); 
    422  
    423  
    424412    DBG_LEAVE (); 
    425413  } 
Note: See TracChangeset for help on using the changeset viewer.